]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Prevent zpool_find_vdev() from truncating vdev path
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 5 Feb 2016 23:41:22 +0000 (18:41 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 8 Feb 2016 17:37:55 +0000 (09:37 -0800)
commiteea9309423d577d62cf62d1f98444e22e264ef15
tree823e293a295b6ba39490f874decacc628a9056d3
parent6b42ea85903b5d96eddbe364e71636e6802d8da0
Prevent zpool_find_vdev() from truncating vdev path

When extracting tokens from the string strtok(2) is allowed to modify
the passed buffer.  Therefore the zfs_strcmp_pathname() function must
make a copy of the passed string before passing it to strtok(3).

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@intel.com>
Closes #4312
lib/libzfs/libzfs_util.c