projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00d8578
)
* don't search for null-lengthened strings.
author
Wilfried Göesgens
<willi@citadel.org>
Sun, 9 Mar 2008 22:03:20 +0000
(22:03 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Sun, 9 Mar 2008 22:03:20 +0000
(22:03 +0000)
libcitadel/lib/hash.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/hash.c
b/libcitadel/lib/hash.c
index 50c3e8d7a5de63b2dfd82ccf001e30e2b77344e1..4443552b9ad66b6e3dd4e42bcb06c779270b851f 100644
(file)
--- a/
libcitadel/lib/hash.c
+++ b/
libcitadel/lib/hash.c
@@
-378,6
+378,10
@@
int GetHash(HashList *Hash, const char *HKey, long HKLen, void **Data)
long HashBinKey;
long HashAt;
+ if (HKLen <= 0) {
+ *Data = NULL;
+ return 0;
+ }
/** first, find out were we could be... */
HashBinKey = CalcHashKey((char*)HKey, HKLen);
HashAt = FindInHash(Hash, HashBinKey);