[libxml2] Use random seed in xmlDictComputeFastKey
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Use random seed in xmlDictComputeFastKey
- Date: Mon, 11 Nov 2019 13:19:41 +0000 (UTC)
commit 3c8a3e9922cb1203ab5998ec542ce1e4c7fd085a
Author: Ranier Vilela <ranier_gyn hotmail com>
Date: Thu Nov 7 12:59:10 2019 +0000
Use random seed in xmlDictComputeFastKey
xmlDictComputeFastKey is only used for small tables, so this shouldn't
be a security problem.
dict.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/dict.c b/dict.c
index 336e046a..26ce516d 100644
--- a/dict.c
+++ b/dict.c
@@ -452,7 +452,7 @@ xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) {
unsigned long value = seed;
if (name == NULL) return(0);
- value = *name;
+ value += *name;
value <<= 5;
if (namelen > 10) {
value += name[namelen - 1];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]