From: David Hankins Date: Wed, 7 Nov 2007 19:42:18 +0000 (+0000) Subject: Don't segfault on NULLs. X-Git-Tag: v4_0_0b3~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b1cb2268112cb68ce4800b8172228dd748f0a64;p=thirdparty%2Fdhcp.git Don't segfault on NULLs. --- diff --git a/omapip/hash.c b/omapip/hash.c index 6c790079d..ab3f8eddd 100644 --- a/omapip/hash.c +++ b/omapip/hash.c @@ -348,6 +348,9 @@ hash_report(struct hash_table *table) unsigned i; struct hash_bucket *bp; + if (table == NULL) + return (unsigned char *) "No table."; + if (table->hash_count == 0) return (unsigned char *) "Invalid hash table.";