Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 2013 00:29:49 +0000 (UTC)
From:      "Simon J. Gerraty" <sjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258114 - head/contrib/bmake
Message-ID:  <201311140029.rAE0TnOQ063361@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sjg
Date: Thu Nov 14 00:29:48 2013
New Revision: 258114
URL: http://svnweb.freebsd.org/changeset/base/258114

Log:
  Don't SEGV when Hash_Table is uninitialized

Modified:
  head/contrib/bmake/hash.c

Modified: head/contrib/bmake/hash.c
==============================================================================
--- head/contrib/bmake/hash.c	Thu Nov 14 00:06:44 2013	(r258113)
+++ head/contrib/bmake/hash.c	Thu Nov 14 00:29:48 2013	(r258114)
@@ -221,6 +221,9 @@ Hash_FindEntry(Hash_Table *t, const char
 	unsigned h;
 	const char *p;
 
+	if (t == NULL || t->bucketPtr == NULL) {
+	    return NULL;
+	}
 	for (h = 0, p = key; *p;)
 		h = (h << 5) - h + *p++;
 	p = key;



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