svn commit: r234378 - stable/9/lib/libc/gen

Sergey Kandaurov pluknet at FreeBSD.org
Tue Apr 17 11:54:01 UTC 2012


Author: pluknet
Date: Tue Apr 17 11:54:01 2012
New Revision: 234378
URL: http://svn.freebsd.org/changeset/base/234378

Log:
  MFC 233296,233300:
   Prevent fs_file NULL pointer dereference.

Modified:
  stable/9/lib/libc/gen/fstab.c
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/gen/fstab.c
==============================================================================
--- stable/9/lib/libc/gen/fstab.c	Tue Apr 17 11:49:21 2012	(r234377)
+++ stable/9/lib/libc/gen/fstab.c	Tue Apr 17 11:54:01 2012	(r234378)
@@ -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;


More information about the svn-src-stable-9 mailing list