svn commit: r234379 - stable/8/lib/libc/gen

Sergey Kandaurov pluknet at FreeBSD.org
Tue Apr 17 11:55:20 UTC 2012


Author: pluknet
Date: Tue Apr 17 11:55:19 2012
New Revision: 234379
URL: http://svn.freebsd.org/changeset/base/234379

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

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

Modified: stable/8/lib/libc/gen/fstab.c
==============================================================================
--- stable/8/lib/libc/gen/fstab.c	Tue Apr 17 11:54:01 2012	(r234378)
+++ stable/8/lib/libc/gen/fstab.c	Tue Apr 17 11:55:19 2012	(r234379)
@@ -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-all mailing list