Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2012 09:42:28 +0000 (UTC)
From:      Sergey Kandaurov <pluknet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233296 - head/lib/libc/gen
Message-ID:  <201203220942.q2M9gSvv017339@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pluknet
Date: Thu Mar 22 09:42:27 2012
New Revision: 233296
URL: http://svn.freebsd.org/changeset/base/233296

Log:
  Prevent fs_file NULL pointer dereference in fixfsfile() uncovered after r1.5
  when passing damaged user-supplied fstab file data.
  
  MFC after:	1 week

Modified:
  head/lib/libc/gen/fstab.c

Modified: head/lib/libc/gen/fstab.c
==============================================================================
--- head/lib/libc/gen/fstab.c	Thu Mar 22 09:29:07 2012	(r233295)
+++ head/lib/libc/gen/fstab.c	Thu Mar 22 09:42:27 2012	(r233296)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203220942.q2M9gSvv017339>