diff --git a/cJSON.c b/cJSON.c index 15bd7f8..6021cad 100644 --- a/cJSON.c +++ b/cJSON.c @@ -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; }