From 91325378cbf59ffca5db0965d01fba2e5cb669c3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 30 Apr 2023 13:37:05 +1000 Subject: [PATCH] Fix potential buffer overflow with FileListEntryPreview::filepath --- source/blender/editors/space_file/filelist.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_file/filelist.cc b/source/blender/editors/space_file/filelist.cc index 6a10df4ce33..c02442f3ad8 100644 --- a/source/blender/editors/space_file/filelist.cc +++ b/source/blender/editors/space_file/filelist.cc @@ -177,7 +177,8 @@ enum { }; struct FileListEntryPreview { - char filepath[FILE_MAX]; + /** Use #FILE_MAX_LIBEXTRA as this is the size written into by #filelist_file_get_full_path. */ + char filepath[FILE_MAX_LIBEXTRA]; uint flags; int index; int attributes; /* from FileDirEntry. */