summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hash.c b/hash.c
index a22e2f2aa26e..ed23644433be 100644
--- a/hash.c
+++ b/hash.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.c,v 1.19 2009/01/24 10:59:09 dsl Exp $ */
+/* $NetBSD: hash.c,v 1.20 2013/11/14 00:27:05 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: hash.c,v 1.19 2009/01/24 10:59:09 dsl Exp $";
+static char rcsid[] = "$NetBSD: hash.c,v 1.20 2013/11/14 00:27:05 sjg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)hash.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: hash.c,v 1.19 2009/01/24 10:59:09 dsl Exp $");
+__RCSID("$NetBSD: hash.c,v 1.20 2013/11/14 00:27:05 sjg Exp $");
#endif
#endif /* not lint */
#endif
@@ -221,6 +221,9 @@ Hash_FindEntry(Hash_Table *t, const char *key)
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;