We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RLP decoding validates that the length is not more than 64 bits before passing this value to fromBigEndian() which expects bytes.
fromBigEndian()
The function fromBigEndian() expects length to be in units of bytes rather than bits. It is therefore possible to have a length larger than uint64 .
For these cases, ensure that length is less than or equal to 8 rather than 64 and encode values in bytes rather than bits.
The text was updated successfully, but these errors were encountered:
rlp: fix bug in decodeLength (#2081)
d8c3e1c
Fixes bug in RLP `decodeLength()` by ensuring that calculations of length should use units of bytes instead of bits. category: bug ticket: #2076
xenowits
No branches or pull requests
🎯 Problem to be solved
RLP decoding validates that the length is not more than 64 bits before passing this value to
fromBigEndian()
which expects bytes.The function fromBigEndian() expects length to be in units of bytes rather than bits. It is therefore possible to have a length larger than uint64 .
🛠️ Proposed solution
For these cases, ensure that length is less than or equal to 8 rather than 64 and encode values in bytes rather than bits.
🧪 Tests
The text was updated successfully, but these errors were encountered: