1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-25 06:03:34 +03:00

Use random seed in xmlDictComputeFastKey

xmlDictComputeFastKey is only used for small tables, so this shouldn't
be a security problem.
This commit is contained in:
Ranier Vilela 2019-11-07 12:59:10 +00:00 committed by Nick Wellnhofer
parent 42942066e1
commit 3c8a3e9922

2
dict.c
View File

@ -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];