Skip to content

Improve error handling in bencode#499

Open
ademuri wants to merge 2 commits intodeluge-torrent:developfrom
ademuri:fuzz-fix
Open

Improve error handling in bencode#499
ademuri wants to merge 2 commits intodeluge-torrent:developfrom
ademuri:fuzz-fix

Conversation

@ademuri
Copy link
Copy Markdown
Contributor

@ademuri ademuri commented Mar 3, 2026

This updates the Python implementation of bencode (including bencode and bdecode) to check that length is non-negative for byte strings, and to enforce a max recursion depth (default of 100, the same as what libtorrent's bencode implementation allows). This more gracefully handles these error conditions.

@ademuri ademuri marked this pull request as ready for review March 3, 2026 04:36
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