Author: tsoome
Date: Wed Jun 17 10:56:58 2020
New Revision: 362265
URL: https://svnweb.freebsd.org/changeset/base/362265
Log:
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.
Modified:
head/stand/libsa/zfs/zfsimpl.c
Modified: head/stand/libsa/zfs/zfsimpl.c
==============================================================================
--- head/stand/libsa/zfs/zfsimpl.c Wed Jun 17 10:50:55 2020
(r362264)
+++ head/stand/libsa/zfs/zfsimpl.c Wed Jun 17 10:56:58 2020
(r362265)
@@ -1201,7 +1201,7 @@ vdev_init(uint64_t guid, const unsigned char *nvlist,
char prefix[] = "/dev/";
len = strlen(prefix);
- if (memcmp(path, prefix, len) == 0) {
+ if (len < pathlen && memcmp(path, prefix, len) == 0) {
path += len;
pathlen -= len;
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"