bluealloy / revm

Rust implementation of the Ethereum Virtual Machine.
https://bluealloy.github.io/revm/
MIT License
1.64k stars 551 forks source link

fix(eof): don't fail if offset overflows `usize` in `RETURNDATALOAD` #1627

Closed DaniPopes closed 3 months ago

DaniPopes commented 3 months ago

As per the spec:

if offset + 32 > len(returndata buffer) the result is zero-padded (same behavior as CALLDATALOAD)

Doesn't matter if 1 above or 2^255 above the length, it's always zero-padded