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

rawEncode silently accepts invalid hex strings #64

Open
lionello opened this issue May 23, 2018 · 1 comment
Open

rawEncode silently accepts invalid hex strings #64

lionello opened this issue May 23, 2018 · 1 comment

Comments

@lionello
Copy link

Actual

$ node
> require('ethereumjs-abi').rawEncode(["uint256"], "g")
<Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10>

The string "g" gets interpreted as "f"+1.

Expected

Calling rawEncode with invalid number or hex string should throw.

@sc0Vu
Copy link

sc0Vu commented Jan 10, 2019

Maybe check value in this function: encodeSingle ?

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

3 participants