This commit is contained in:
hopper-vul 2023-07-05 11:22:28 +08:00 committed by GitHub
commit aebee7e671
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2186,7 +2186,7 @@ CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * c
CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)
{
if ((parent == NULL) || (item == NULL))
if ((parent == NULL) || (item == NULL) || (item->prev == NULL))
{
return NULL;
}