mirror of
https://github.com/DaveGamble/cJSON.git
synced 2025-07-04 05:40:05 +08:00
handle null pointers: cJSONUtils_GeneratePatchesCaseSensitive
This commit is contained in:
@ -1243,7 +1243,14 @@ CJSON_PUBLIC(cJSON *) cJSONUtils_GeneratePatches(cJSON * const from, cJSON * con
|
||||
|
||||
CJSON_PUBLIC(cJSON *) cJSONUtils_GeneratePatchesCaseSensitive(cJSON * const from, cJSON * const to)
|
||||
{
|
||||
cJSON *patches = cJSON_CreateArray();
|
||||
cJSON *patches = NULL;
|
||||
|
||||
if ((from == NULL) || (to == NULL))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
patches = cJSON_CreateArray();
|
||||
create_patches(patches, (const unsigned char*)"", from, to, true);
|
||||
|
||||
return patches;
|
||||
|
Reference in New Issue
Block a user