From 100373ed0794eb31163d2be1b9deac217c39f6ff Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 1 Jun 2017 14:19:25 +0200 Subject: [PATCH] avoid potential sprintf overflow (GCC7) --- camlibs/panasonic/l859/l859.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camlibs/panasonic/l859/l859.c b/camlibs/panasonic/l859/l859.c index cae2281cb7..67a1cdd9db 100644 --- a/camlibs/panasonic/l859/l859.c +++ b/camlibs/panasonic/l859/l859.c @@ -446,7 +446,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder, if (size == 0) return GP_OK; - if (!(filename = (char*)malloc(30))) { + if (!(filename = (char*)malloc(31))) { GP_DEBUG ("Unable to allocate memory for filename."); return GP_ERROR_NO_MEMORY; }