From owner-svn-src-all@FreeBSD.ORG Thu Nov 14 00:29:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EE3B5ED; Thu, 14 Nov 2013 00:29:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E12F2DAB; Thu, 14 Nov 2013 00:29:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAE0Tnet063362; Thu, 14 Nov 2013 00:29:49 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAE0TnOQ063361; Thu, 14 Nov 2013 00:29:49 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201311140029.rAE0TnOQ063361@svn.freebsd.org> From: "Simon J. Gerraty" Date: Thu, 14 Nov 2013 00:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258114 - head/contrib/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 00:29:49 -0000 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;