[asterisk-commits] tilghman: trunk r221971 - in /trunk: ./ main/astobj2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 2 12:00:00 CDT 2009


Author: tilghman
Date: Fri Oct  2 11:59:57 2009
New Revision: 221971

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=221971
Log:
Merged revisions 221970 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r221970 | tilghman | 2009-10-02 11:58:03 -0500 (Fri, 02 Oct 2009) | 2 lines
  
  Ensure the result of the hash function is positive.  Negative array offsets suck.
........

Modified:
    trunk/   (props changed)
    trunk/main/astobj2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astobj2.c?view=diff&rev=221971&r1=221970&r2=221971
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Fri Oct  2 11:59:57 2009
@@ -509,7 +509,7 @@
 	if (!p)
 		return NULL;
 
-	i = c->hash_fn(user_data, OBJ_POINTER);
+	i = abs(c->hash_fn(user_data, OBJ_POINTER));
 
 	ao2_lock(c);
 	i %= c->n_buckets;




More information about the asterisk-commits mailing list