diff --git a/cJSON.c b/cJSON.c index eff35bc..fd83a2d 100644 --- a/cJSON.c +++ b/cJSON.c @@ -2242,7 +2242,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateDoubleArray(const double *numbers, int count) cJSON *p = NULL; cJSON *a = NULL; - if (count < 0) + if ((count < 0) || (numbers == NULL)) { return NULL; }