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 <behlendorf1@llnl.gov>
This commit is contained in:
Ned Bass 2010-10-11 14:48:52 -07:00 committed by Brian Behlendorf
parent 4b1abce9f5
commit 5c1bad0013
1 changed files with 1 additions and 1 deletions

View File

@ -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> */