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:
parent
4b1abce9f5
commit
5c1bad0013
|
@ -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> */
|
||||
|
|
Loading…
Reference in New Issue