diff --git a/cJSON.c b/cJSON.c index fd83a2d..ed2246e 100644 --- a/cJSON.c +++ b/cJSON.c @@ -2278,7 +2278,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char **strings, int count) cJSON *p = NULL; cJSON *a = NULL; - if (count < 0) + if ((count < 0) || (strings == NULL)) { return NULL; }