diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2007-12-31 23:44:53 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2007-12-31 23:44:53 +0000 |
commit | 9cea85864d49868ad2155b6f59d9ebd33a998a3f (patch) | |
tree | f7b8261e56c4b6fae3dffbf2800d18d1f46653dc /sys | |
parent | 6017be00afae64c1500101127fb40991a0c2346d (diff) | |
download | FreeBSD-src-9cea85864d49868ad2155b6f59d9ebd33a998a3f.zip FreeBSD-src-9cea85864d49868ad2155b6f59d9ebd33a998a3f.tar.gz |
In vfs_scanopt(), make sure that the mount option value is not NULL
before calling vsscanf().
PR: 118531
Submitted by: Jaakko Heinonen <jh saunalahti fi>
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_mount.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |