From ab921321e1ca6303ee0fa2f2de511b490d9d6427 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 27 Jun 2016 12:38:12 +0200 Subject: Fix (unreported) potential buffer overflow with BLO_library_path_explode() usage. Also added warning to func doc, let's try to avoid this in future (for until we pass string length systematically...). --- source/blender/imbuf/intern/thumbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 95d061bcb75..3629332a4ac 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -46,6 +46,8 @@ #include "BLO_readfile.h" +#include "DNA_space_types.h" /* For FILE_MAX_LIBEXTRA */ + #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" #include "IMB_thumbs.h" @@ -533,7 +535,7 @@ ImBuf *IMB_thumb_manage(const char *org_path, ThumbSize size, ThumbSource source char thumb_path[FILE_MAX]; char thumb_name[40]; char uri[URI_MAX]; - char path_buff[FILE_MAX]; + char path_buff[FILE_MAX_LIBEXTRA]; const char *file_path; const char *path; BLI_stat_t st; -- cgit v1.2.3