Skip to content

Commit

Permalink
dlt_multiple_files: Fix missing string null-terminator (#618)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrii.Simiklit <andrii.simiklit@globallogic.com>
  • Loading branch information
asimiklit authored Apr 29, 2024
1 parent 72d068c commit 0cb183b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/dlt_multiple_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ unsigned int multiple_files_buffer_storage_dir_info(const char *path, const char

if ((tmp_new != NULL) && (strlen(tmp_new) < NAME_MAX)) {
strncpy(newest, tmp_new, NAME_MAX);
oldest[NAME_MAX] = '\0';
newest[NAME_MAX] = '\0';
} else if ((tmp_new != NULL) && (strlen(tmp_new) >= NAME_MAX)) {
printf("length mismatch of file %s\n", tmp_new);
}
Expand Down

0 comments on commit 0cb183b

Please sign in to comment.