mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-28 08:22:24 +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/`.
24 lines
707 B
Markdown
24 lines
707 B
Markdown
# 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:
|
|
```json
|
|
{
|
|
"target": "functionName",
|
|
"input": { ... },
|
|
"error": { ... }
|
|
}
|
|
```
|
|
|
|
## Known Issues
|
|
|
|
- `buildVideoPostEvent` crashes on circular objects if not handled (Fixed).
|
|
- `normalizeAndAugmentMagnet` crashes on non-iterable `extraTrackers` (Fixed).
|
|
- `build...` functions crash on `null`/`undefined` input (Fixed).
|