Skip to content

Commit 6a5c60f

Browse files
committed
fix snprintf length argument
1 parent 14a755c commit 6a5c60f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

darshan-runtime/lib/darshan-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ void darshan_core_shutdown(int write_log)
497497
err = close(mmap_fd);
498498
if (err < 0)
499499
darshan_core_fprintf(stderr, "darshan:log duplication close (%s)\n", strerror(errno));
500-
snprintf(dup_log_fame, strlen(final_core->mmap_log_name), "%s.dup",
500+
snprintf(dup_log_fame, strlen(final_core->mmap_log_name)+5, "%s.dup",
501501
final_core->mmap_log_name);
502502
dup_mmap_fd = open(dup_log_fame, O_CREAT | O_WRONLY, 0644);
503503
if (dup_mmap_fd != -1) {

0 commit comments

Comments
 (0)