mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
- Add fuzz testing scripts for `nostrEventSchemas.js`, `dmDecryptor.js`, and `magnetUtils.js` in `scripts/agent/`. - Fix `build...` functions in `nostrEventSchemas.js` to handle `null`/`undefined` inputs. - Fix `buildVideoPostEvent` to gracefully handle circular references in content serialization. - Fix `normalizeAndAugmentMagnet` in `magnetUtils.js` to handle non-iterable `extraTrackers`. - Include minimal reproducers for discovered crashes in `examples/reproducers/`.
Fuzz Testing Reproducers
This directory contains reproducers for crashes found during fuzz testing. These files contain the input that caused a crash and the error message.
How to run
The reproducers are JSON files. To re-run a specific case, you can use the fuzz harness and load the JSON input, or manually import the function and call it with the input.
Example structure:
{
"target": "functionName",
"input": { ... },
"error": { ... }
}
Known Issues
buildVideoPostEventcrashes on circular objects if not handled (Fixed).normalizeAndAugmentMagnetcrashes on non-iterableextraTrackers(Fixed).build...functions crash onnull/undefinedinput (Fixed).