Skip to content

Commit

Permalink
avoid potential sprintf overflow (GCC7)
Browse files Browse the repository at this point in the history
  • Loading branch information
msmeissn committed Jun 1, 2017
1 parent ab0da39 commit 100373e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion camlibs/panasonic/l859/l859.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 100373e

Please sign in to comment.