]> granicus.if.org Git - php/commitdiff
- MFH: Fixed bug #38698
authorMarcus Boerger <helly@php.net>
Fri, 3 Nov 2006 19:00:46 +0000 (19:00 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 3 Nov 2006 19:00:46 +0000 (19:00 +0000)
ext/dba/libcdb/cdb.c

index acafe952f3c198383dd6806711c9b6a158b4b63b..af6e1bb8f0a83a33a6fd2f50ba9b68eba5c3c7f5 100644 (file)
@@ -68,10 +68,11 @@ static int cdb_match(struct cdb *c, char *key, unsigned int len, uint32 pos TSRM
 uint32 cdb_hash(char *buf, unsigned int len)
 {
        uint32 h;
+       const unsigned char * b = buf;
 
        h = CDB_HASHSTART;
        while (len--) {
-               h = ( h + (h << 5)) ^ (*buf++);
+               h = ( h + (h << 5)) ^ (*b++);
        }
        return h;
 }