1 Commits

Author SHA1 Message Date
Zhao Mengmeng
d76505099f Set free'd pointers to NULL whenever they are not reassigned
Backport from upstream:
542fb0eadd

A double free vulnerability was discovered in cJSON_Delete function through
fuzzing. Fix it by set pointers to NULL immediately after they are deallocated.

Links: https://github.com/DaveGamble/cJSON/issues/833

Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
(cherry picked from commit 1243399bf7d1638e0f8a4943c4c553fba4964bfd)
2024-06-07 11:46:25 +08:00