handle null pointers: cJSON_Minify

This commit is contained in:
Max Bruckner 2017-06-28 14:17:23 +02:00
parent 39745c9c75
commit 24ea388dcf
1 changed files with 6 additions and 0 deletions

View File

@ -2390,6 +2390,12 @@ fail:
CJSON_PUBLIC(void) cJSON_Minify(char *json)
{
unsigned char *into = (unsigned char*)json;
if (json == NULL)
{
return;
}
while (*json)
{
if (*json == ' ')