Skip to content

Commit 6cc787a

Browse files
committed
zdtm/lib: fix a case when a string may be unterminated
CID 153098 (checkpoint-restore#3 of 3): Buffer not null terminated (BUFFER_SIZE_WARNING) 10. buffer_size_warning: Calling strncpy with a maximum size argument of 64 bytes on destination array m->fsname of size 64 bytes might leave the destination string unterminated. Signed-off-by: Andrei Vagin <[email protected]>
1 parent e6b1321 commit 6cc787a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/zdtm/lib/fs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mnt_info_t *get_cwd_mnt_info(void)
3434

3535
mnt_info_t *m = NULL;
3636

37-
char mountpoint[PATH_MAX];
37+
char mountpoint[64];
3838
char root[PATH_MAX];
3939

4040
char *fsname = NULL;

0 commit comments

Comments
 (0)