diff options
author | pluknet <pluknet@FreeBSD.org> | 2012-03-22 09:42:27 +0000 |
---|---|---|
committer | pluknet <pluknet@FreeBSD.org> | 2012-03-22 09:42:27 +0000 |
commit | 38c24aff4ef68f245e8904507b3c07ff876d3b6b (patch) | |
tree | 49ac9df64295a30aa0f65369a04482db265b50c3 /lib/libc | |
parent | bb8b60747976a6ae626247533eb525143c01eab0 (diff) | |
download | FreeBSD-src-38c24aff4ef68f245e8904507b3c07ff876d3b6b.zip FreeBSD-src-38c24aff4ef68f245e8904507b3c07ff876d3b6b.tar.gz |
Prevent fs_file NULL pointer dereference in fixfsfile() uncovered after r1.5
when passing damaged user-supplied fstab file data.
MFC after: 1 week
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/fstab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c index 9dac476..e9c313d 100644 --- a/lib/libc/gen/fstab.c +++ b/lib/libc/gen/fstab.c @@ -91,7 +91,7 @@ fixfsfile() struct stat sb; struct statfs sf; - if (strcmp(_fs_fstab.fs_file, "/") != 0) + if (_fs_fstab.fs_file != NULL &&strcmp(_fs_fstab.fs_file, "/") != 0) return; if (statfs("/", &sf) != 0) return; |