Skip to content

Commit ec49d46

Browse files
sndk: fixed build failure
Fixed build error in sandisk-nvme.c Signed-off-by: jeff-lien-sndk <[email protected]>
1 parent 761cdf5 commit ec49d46

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/sandisk/sandisk-nvme.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static int sndk_vs_internal_fw_log(int argc, char **argv,
393393
"Output file size. Deprecated, see man page for supported devices.";
394394
const char *offset =
395395
"Output file data offset. Deprecated, see man page for supported devices.";
396-
char f[PATH_MAX] = {0};
396+
char f[PATH_MAX-4] = {0};
397397
char fileSuffix[PATH_MAX] = {0};
398398
__u32 xfer_size = 0;
399399
int telemetry_type = 0, telemetry_data_area = 0;
@@ -463,7 +463,7 @@ static int sndk_vs_internal_fw_log(int argc, char **argv,
463463
}
464464
close(verify_file);
465465
remove(cfg.file);
466-
strncpy(f, cfg.file, PATH_MAX - 1);
466+
strncpy(f, cfg.file, PATH_MAX - 5);
467467
} else {
468468
sndk_UtilsGetTime(&timeInfo);
469469
memset(timeStamp, 0, sizeof(timeStamp));

0 commit comments

Comments
 (0)