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

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

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

DaniPopes
Copy link
Collaborator

@DaniPopes DaniPopes commented Jul 16, 2024

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

@DaniPopes DaniPopes changed the title fix(eof): don't fail if offset overflows usize fix(eof): don't fail if offset overflows usize in returndataload Jul 16, 2024
@DaniPopes DaniPopes changed the title fix(eof): don't fail if offset overflows usize in returndataload fix(eof): don't fail if offset overflows usize in RETURNDATALOAD Jul 16, 2024
Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@rakita rakita merged commit 887c5d9 into bluealloy:main Jul 16, 2024
26 checks passed
@DaniPopes DaniPopes deleted the returndatacopy-oog branch July 16, 2024 22:32
This was referenced Jul 16, 2024
j75689 pushed a commit to j75689/revm that referenced this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants