summaryrefslogtreecommitdiff
path: root/ext/dba/libcdb
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2006-11-03 19:00:46 +0000
committerMarcus Boerger <helly@php.net>2006-11-03 19:00:46 +0000
commit2820e9cf1e6aa000562e0dea7707dbd0b324969b (patch)
treec38622805a418bbc0b3c3bf36a32a46cbf1d83fd /ext/dba/libcdb
parent76ba475d7604f9ef521ee0e7d19685698a925204 (diff)
downloadphp-git-2820e9cf1e6aa000562e0dea7707dbd0b324969b.tar.gz
- MFH: Fixed bug #38698
Diffstat (limited to 'ext/dba/libcdb')
-rw-r--r--ext/dba/libcdb/cdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/dba/libcdb/cdb.c b/ext/dba/libcdb/cdb.c
index acafe952f3..af6e1bb8f0 100644
--- a/ext/dba/libcdb/cdb.c
+++ b/ext/dba/libcdb/cdb.c
@@ -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;
}