mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
Properly NULL terminate string in zfs_strcmp_pathname
The utility cppcheck caught this. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #2330
This commit is contained in:
parent
a05dfd0028
commit
928ee9fe18
@ -962,7 +962,7 @@ zfs_strcmp_pathname(char *name, char *cmp, int wholedisk)
|
||||
if (name[0] != '/')
|
||||
return (zfs_strcmp_shortname(name, cmp_name, wholedisk));
|
||||
|
||||
strncpy(path_name, name, MAXPATHLEN);
|
||||
(void) strlcpy(path_name, name, MAXPATHLEN);
|
||||
path_len = strlen(path_name);
|
||||
cmp_len = strlen(cmp_name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user