Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: hopper-vul <[email protected]>
- Loading branch information