Skip to content

Commit 032e986

Browse files
sndk: Fix for issue #3141
Limit the size of a file name string to the declared size. Signed-off-by: jeff-lien-sndk <[email protected]>
1 parent c0d8d44 commit 032e986

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/sandisk/sandisk-nvme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static int sndk_vs_internal_fw_log(int argc, char **argv,
476476
timeInfo.second);
477477
snprintf(fileSuffix, PATH_MAX, "_internal_fw_log_%s", (char *)timeStamp);
478478

479-
ret = sndk_get_serial_name(hdl, f, PATH_MAX, fileSuffix);
479+
ret = sndk_get_serial_name(hdl, f, PATH_MAX-5, fileSuffix);
480480
if (ret) {
481481
fprintf(stderr, "ERROR: SNDK: failed to generate file name\n");
482482
goto out;

0 commit comments

Comments
 (0)