mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-10-24 01:09:01 +03:00
xmlGrowArray: guard against NULL capacity pointer
This commit is contained in:
committed by
Daniel Garcia Moreno
parent
d28f35a26e
commit
962bd10d01
@@ -367,6 +367,9 @@ xmlGrowArray(void *array, size_t elemSize, int *capacity, int min, int max) {
|
||||
void *tmp;
|
||||
int newSize;
|
||||
|
||||
if (capacity == NULL)
|
||||
return(NULL);
|
||||
|
||||
newSize = xmlGrowCapacity(*capacity, elemSize, min, max);
|
||||
if (newSize < 0)
|
||||
return(NULL);
|
||||
|
||||
Reference in New Issue
Block a user