handle null pointers: cJSON_CreateStringArray

This commit is contained in:
Max Bruckner 2017-06-27 23:05:38 +02:00
parent c268e77b21
commit 9585c38d5a

View File

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