loader: r362262 did miss the pathlen check
While we are checking the "/dev/" prefix, we can skip the paths shorter than this prefix. Sponsored by: Netflix, Klara Inc.
This commit is contained in:
parent
b6aadd183a
commit
aba2397e74
@ -1201,7 +1201,7 @@ vdev_init(uint64_t guid, const unsigned char *nvlist, vdev_t **vdevp)
|
||||
char prefix[] = "/dev/";
|
||||
|
||||
len = strlen(prefix);
|
||||
if (memcmp(path, prefix, len) == 0) {
|
||||
if (len < pathlen && memcmp(path, prefix, len) == 0) {
|
||||
path += len;
|
||||
pathlen -= len;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user