Skip to content
Snippets Groups Projects
Unverified Commit 766dd9d5 authored by hopper-vul's avatar hopper-vul Committed by GitHub
Browse files

Fix a null pointer crash in cJSON_ReplaceItemViaPointer (#726)


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>
parent b45f48e6
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment