Skip to content

Commit

Permalink
fix null deref: cJSON_CreateStringArray
Browse files Browse the repository at this point in the history
  • Loading branch information
FSMaxB committed Jun 27, 2017
1 parent cb9f068 commit 2118c3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2118c3d

Please sign in to comment.