Fix various potential null ptr deref and int32 overflows
This fix errors that can happen when ingesting very large JSON files when hitting the maximum heap size of the process.
This commit is contained in:
1 parent
537f8bcbdb
commit
77a4276a8c
3 files changed
+38
-4
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user