The Samba-Bugzilla – Attachment 6291 Details for
Bug 8010
str_checksum often returns same value for different strings [Patch]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
0001-s3-Use-jenkins-hash-for-str_checksum-fix-bug-8010.patch (text/plain), 1.06 KB, created by
Volker Lendecke
on 2011-03-15 08:37:11 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2011-03-15 08:37:11 UTC
Size:
1.06 KB
patch
obsolete
>From 01ca214217f7feacd1f27c75f101fac771daf611 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Tue, 15 Mar 2011 09:30:22 +0100 >Subject: [PATCH] s3: Use jenkins hash for str_checksum, fix bug 8010 > >From the bugreport: > >I have a folder with ~90 photos: IMG_XXXX.JPG where XXXX is a four digit >number, almost consecutive (photos from camera for one day). >Current implementation gives about 30 different checksums for this set of >files. >--- > source3/lib/util.c | 13 ++----------- > 1 files changed, 2 insertions(+), 11 deletions(-) > >diff --git a/source3/lib/util.c b/source3/lib/util.c >index 81d2a78..b6128fe 100644 >--- a/source3/lib/util.c >+++ b/source3/lib/util.c >@@ -1899,17 +1899,8 @@ const char *tab_depth(int level, int depth) > > int str_checksum(const char *s) > { >- int res = 0; >- int c; >- int i=0; >- >- while(*s) { >- c = *s; >- res ^= (c << (i % 15)) ^ (c >> (15-(i%15))); >- s++; >- i++; >- } >- return(res); >+ TDB_DATA key = string_tdb_data(s); >+ return tdb_jenkins_hash(&key); > } > > /***************************************************************** >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8010
:
6290
|
6291
|
6293
|
6295
|
6297