handle null pointers: cJSON_CreateFloatArray

This commit is contained in:
Max Bruckner
2017-06-28 14:22:07 +02:00
parent 010e31f2f2
commit 9f745a2251
+1 -1
View File
@@ -2206,7 +2206,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count)
cJSON *p = NULL;
cJSON *a = NULL;
if (count < 0)
if ((count < 0) || (numbers == NULL))
{
return NULL;
}