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(returndatacopy): Data offset out of bounds is still an error even if len==0 #31

Merged
merged 2 commits into from
Sep 21, 2023

Conversation

birchmd
Copy link
Member

@birchmd birchmd commented Sep 21, 2023

I made a mistake in #26 by adding the early return when len == 0. The function is still supposed to return an error if the data_offset is out of bounds even if when len is zero. This was causing a failure in the st_memory EVM test.

I have modified the logic to simply assign memory_offset as 0 if len == 0 instead of existing the function early. This assignment is safe because memory_offset is not actually used in any of the memory-related functions in the case len is zero.

All the EVM tests now once again pass.

@birchmd birchmd added the bug Something isn't working label Sep 21, 2023
@birchmd birchmd requested review from mrLSD and aleksuss September 21, 2023 15:54
@birchmd birchmd merged commit c6c23ac into v0.38.4-aurora-branch Sep 21, 2023
3 checks passed
@birchmd birchmd deleted the fix/birchmd/returndatacopy branch September 21, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants