From 9cea85864d49868ad2155b6f59d9ebd33a998a3f Mon Sep 17 00:00:00 2001 From: rodrigc Date: Mon, 31 Dec 2007 23:44:53 +0000 Subject: In vfs_scanopt(), make sure that the mount option value is not NULL before calling vsscanf(). PR: 118531 Submitted by: Jaakko Heinonen MFC after: 3 days --- sys/kern/vfs_mount.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 6a615b1..a392f23 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1946,6 +1946,8 @@ vfs_scanopt(struct vfsoptlist *opts, const char *name, const char *fmt, ...) TAILQ_FOREACH(opt, opts, link) { if (strcmp(name, opt->name) != 0) continue; + if (opt->len == 0 || opt->value == NULL) + return (0); if (((char *)opt->value)[opt->len - 1] != '\0') return (0); va_start(ap, fmt); -- cgit v1.1