summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpluknet <pluknet@FreeBSD.org>2012-03-22 09:42:27 +0000
committerpluknet <pluknet@FreeBSD.org>2012-03-22 09:42:27 +0000
commit38c24aff4ef68f245e8904507b3c07ff876d3b6b (patch)
tree49ac9df64295a30aa0f65369a04482db265b50c3 /lib
parentbb8b60747976a6ae626247533eb525143c01eab0 (diff)
downloadFreeBSD-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')
-rw-r--r--lib/libc/gen/fstab.c2
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;
OpenPOWER on IntegriCloud