summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/libxml/src/dict.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/libxml/src/dict.c')
-rw-r--r--chromium/third_party/libxml/src/dict.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/chromium/third_party/libxml/src/dict.c b/chromium/third_party/libxml/src/dict.c
index 13353872434..d0208da1f40 100644
--- a/chromium/third_party/libxml/src/dict.c
+++ b/chromium/third_party/libxml/src/dict.c
@@ -431,7 +431,8 @@ static unsigned long
xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) {
unsigned long value = seed;
- if (name == NULL) return(0);
+ if ((name == NULL) || (namelen <= 0))
+ return(value);
value += *name;
value <<= 5;
if (namelen > 10) {