Skip to content

Commit

Permalink
s/strncpy/strlcpy/ and also adjust the length argument
Browse files Browse the repository at this point in the history
  • Loading branch information
dweeezil committed Oct 16, 2013
1 parent 1a91683 commit 29b2094
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/zfs_ioctl.c
Expand Up @@ -3366,7 +3366,7 @@ zfs_unmount_snap(const char *snapname)
return (0);

dsname = kmem_alloc(ptr - snapname + 1, KM_SLEEP);
strncpy(dsname, snapname, ptr - snapname);
strlcpy(dsname, snapname, ptr - snapname + 1);
fullname = strdup(snapname);

err = zfs_sb_hold(dsname, FTAG, &zsb, B_FALSE);
Expand Down

0 comments on commit 29b2094

Please sign in to comment.