handle null pointers: cJSON_CreateIntArray

This commit is contained in:
Max Bruckner 2017-06-27 23:04:28 +02:00
parent 8ea37fce01
commit 010e31f2f2

View File

@ -2171,7 +2171,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count)
cJSON *p = NULL;
cJSON *a = NULL;
if (count < 0)
if ((count < 0) || (numbers == NULL))
{
return NULL;
}