mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-02-04 01:47:02 +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:
parent
42942066e1
commit
3c8a3e9922
2
dict.c
2
dict.c
@ -452,7 +452,7 @@ xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) {
|
|||||||
unsigned long value = seed;
|
unsigned long value = seed;
|
||||||
|
|
||||||
if (name == NULL) return(0);
|
if (name == NULL) return(0);
|
||||||
value = *name;
|
value += *name;
|
||||||
value <<= 5;
|
value <<= 5;
|
||||||
if (namelen > 10) {
|
if (namelen > 10) {
|
||||||
value += name[namelen - 1];
|
value += name[namelen - 1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user