bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] hash: silence spurious clang warning


From: Eric Blake
Subject: Re: [PATCH] hash: silence spurious clang warning
Date: Tue, 31 Aug 2010 08:11:22 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

On 08/31/2010 02:10 AM, Jim Meyering wrote:
Eric, I've listed you as an author, so will wait for your ACK.

From 5bcff7b85b7b88fa4809ad874a1203e27abed085 Mon Sep 17 00:00:00 2001
From: Eric Blake<address@hidden>
Date: Tue, 31 Aug 2010 10:06:16 +0200
Subject: [PATCH] hash: factor, and guard against misbehaving hasher function

* lib/hash.c (safe_hasher): New function, to encapsulate the checking
of table->hasher's return value.  Also protect against a hash value
so large that adding it to table->bucket would result in a NULL pointer.
(hash_lookup, hash_get_next, hash_find_entry): Use it in place of
open-coded check-and-abort.

ACK from me.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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