提交 9f745a22 编写于 作者: M Max Bruckner

handle null pointers: cJSON_CreateFloatArray

上级 010e31f2
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册