Merge pull request #219 from rouault/low_heap_robustness_fixes

Fix various potential null ptr deref and int32 overflows
This commit is contained in:
Eric Haszlakiewicz
2016-04-30 14:44:05 -04:00
3 changed files with 38 additions and 4 deletions

View File

@@ -934,6 +934,11 @@ struct json_object* json_object_new_array(void)
jso->_delete = &json_object_array_delete;
jso->_to_json_string = &json_object_array_to_json_string;
jso->o.c_array = array_list_new(&json_object_array_entry_free);
if(jso->o.c_array == NULL)
{
free(jso);
return NULL;
}
return jso;
}