Skip to content
Snippets Groups Projects
user avatar
hopper-vul authored
If the parent passed in cJSON_ReplaceItemViaPointer has not a child, which means parent->child is null, a null pointer dereference crash will be happened inside cJSON_ReplaceItemViaPointer.

This commit adds the NULL check of `parent->child` beforehand to inform user such incorrect usage.

Signed-off-by: default avatarhopper-vul <hopper.vul@gmail.com>
766dd9d5
History
Name Last commit Last update