mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-26 14:50:08 +03:00
hash: Fix integer overflow of nbElems
This commit is contained in:
parent
bfd7d28698
commit
4b8f7cf05d
4
hash.c
4
hash.c
@ -541,7 +541,7 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name,
|
||||
xmlHashEntryPtr entry;
|
||||
xmlHashEntryPtr insert;
|
||||
|
||||
if ((table == NULL) || (name == NULL))
|
||||
if ((table == NULL) || (name == NULL) || (table->nbElems == INT_MAX))
|
||||
return(-1);
|
||||
|
||||
/*
|
||||
@ -680,7 +680,7 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name,
|
||||
xmlHashEntryPtr entry;
|
||||
xmlHashEntryPtr insert;
|
||||
|
||||
if ((table == NULL) || name == NULL)
|
||||
if ((table == NULL) || (name == NULL) || (table->nbElems == INT_MAX))
|
||||
return(-1);
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user