Skip to content

fuzzing: add a fuzzer for cJSON_Utils - #1

Closed
0xalpharush wants to merge 1 commit into
masterfrom
fuzz-utils
Closed

0xalpharush wants to merge 1 commit into
masterfrom
fuzz-utils

Conversation

@0xalpharush

Copy link
Copy Markdown
Owner

OSS-Fuzz builds only cjson_read_fuzzer, so nothing fuzzes cJSON_Utils.c. This adds cjson_utils_fuzzer. Its input is two NUL-terminated strings. The fuzzer parses both, then runs JSON Pointer lookup, applying the second document as a JSON Patch, generating and applying patches, merge patch, FindPointerFromObjectTo and SortObject. ossfuzz.sh now builds cJSON_Utils and the new target, and reuses json.dict.

Tested (clang 18, ASan+UBSan, libFuzzer, built through fuzzing/ossfuzz.sh):

🤖 Generated with Claude Code

No fuzzer covered cJSON_Utils. The new target parses two documents and
runs the JSON Pointer, JSON Patch and merge patch functions on them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xalpharush

Copy link
Copy Markdown
Owner Author

Upstreamed as DaveGamble#1118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant