bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #21823] Potential NULL pointer dereference on hash.c, hash_insert


From: Paul D. Smith
Subject: [bug #21823] Potential NULL pointer dereference on hash.c, hash_insert
Date: Fri, 28 Mar 2008 04:24:32 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080325 Ubuntu/7.10 (gutsy) Firefox/2.0.0.13

Follow-up Comment #3, bug #21823 (project make):

This is confusing, and the lack of detailed comments in hash.c doesn't help.

However, I think this particular bug is impossible.  Looking at the
implementation of hash_find_slot(), it seems there is no way for that function
to return null.  So, the test in hash_insert() to see if slot is null is
unneeded and we can never pass null to hash_insert_at() from hash_insert().

That useless check in hash_insert() should be removed to avoid a bit of
confusion and a useless operation or two.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?21823>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]