1
0
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:
Mohammad Seet
2026-05-26 22:06:25 +02:00
committed by Daniel Garcia Moreno
parent d28f35a26e
commit 962bd10d01

View File

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