svn commit: r258114 - head/contrib/bmake
Simon J. Gerraty
sjg at FreeBSD.org
Thu Nov 14 00:29:49 UTC 2013
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;
More information about the svn-src-head
mailing list