webtorrent / webtorrent/node-bencode
decode.bytes does not adhere to abstract-encoding spec
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 173
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
What version of this package are you using?
Latest
What operating system, Node.js, and npm version?
Arch Linux, latest Node LTS (v20)
What happened?
decode.bytes returns the length of the entire input data after decoding
What did you expect to happen?
It should've returned only the number of bytes consumed.
Are you willing to submit a pull request to fix this bug?
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the decode.bytes entry point and compare its behavior with the abstract-encoding specification. Reproduce decoding input containing additional data, then add or update coverage so the result reports only the bytes consumed rather than the full input length.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100