handle null pointers: cJSON_CreateStringArray

This commit is contained in:
Max Bruckner
2017-06-28 14:22:22 +02:00
parent c268e77b21
commit 9585c38d5a
+1 -1
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;
}