Skip to content
New issue

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

Make decoding of bytes more robust #49

Closed
rmeissner opened this issue Nov 6, 2018 · 0 comments
Closed

Make decoding of bytes more robust #49

rmeissner opened this issue Nov 6, 2018 · 0 comments

Comments

@rmeissner
Copy link
Member

rmeissner commented Nov 6, 2018

Some abi encoder encode empty bytes as
0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (length = 0 and an 0-bytes body)

bivrost is expecting 0x0000000000000000000000000000000000000000000000000000000000000000

we make use of this assumption when decoding tuples. Therefore we will have unexpected results if we try to decode tuples that contain the "padded" encoding.

The solution would be to parse the position of each dynamic type and jump to that position for decoding.

rmeissner added a commit that referenced this issue Nov 6, 2018
rmeissner added a commit that referenced this issue Nov 6, 2018
rmeissner added a commit that referenced this issue Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant