mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-18 12:25:12 +00:00
4db925911c
Use the safe version of strncpy that makes sure the string is terminated. To be noted: - the conversion in scrub path handling was skipped - sizes of device paths in some ioctl related structures is BTRFS_DEVICE_PATH_NAME_MAX + 1 Recently gcc 13.3 started to detect problems with our use of strncpy potentially lacking the null terminator, warnings like: cmds/inspect.c: In function ‘cmd_inspect_logical_resolve’: cmds/inspect.c:294:33: warning: ‘__builtin_strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation] 294 | strncpy(mount_path, mounted, PATH_MAX); | ^ Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
common.c | ||
common.h | ||
main.c | ||
Makefile | ||
rootdir.c | ||
rootdir.h |