diff options
author | Ned Bass <[email protected]> | 2010-10-11 14:48:52 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-10-12 14:47:39 -0700 |
commit | 5c1bad0013204d70c5b60713af977bdaa5df1302 (patch) | |
tree | 5684b9add89f7d6421b1517997c17f05e767fb30 /cmd/zpool/zpool_vdev.c | |
parent | 4b1abce9f5c20e298ddaa3368b3fb6a529c71459 (diff) |
Fix undersized buffer in is_shorthand_path()
The string array 'char dirs[5][8]' was too small to accomodate the terminating
NUL character in "by-label". This change adds the needed additional byte.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'cmd/zpool/zpool_vdev.c')
-rw-r--r-- | cmd/zpool/zpool_vdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c index febdda95f..d4838ad2d 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c @@ -384,7 +384,7 @@ static int is_shorthand_path(const char *arg, char *path, struct stat64 *statbuf, boolean_t *wholedisk) { - char dirs[5][8] = {"by-id", "by-label", "by-path", "by-uuid", "zpool"}; + char dirs[5][9] = {"by-id", "by-label", "by-path", "by-uuid", "zpool"}; int i, err; /* /dev/<name> */ |