提交 9585c38d 编写于 作者: M Max Bruckner

handle null pointers: cJSON_CreateStringArray

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