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

eof: Represent MAGIC as bytes_view #947

Merged
merged 1 commit into from
Jul 4, 2024
Merged

eof: Represent MAGIC as bytes_view #947

merged 1 commit into from
Jul 4, 2024

Conversation

chfast
Copy link
Member

@chfast chfast commented Jul 4, 2024

This allows using .starts_with().

This allows using `.starts_with()`.
@chfast chfast requested review from gumb0 and pdobacz July 4, 2024 12:28
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.29%. Comparing base (a630196) to head (771c979).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #947      +/-   ##
==========================================
- Coverage   94.29%   94.29%   -0.01%     
==========================================
  Files         143      143              
  Lines       16120    16119       -1     
==========================================
- Hits        15200    15199       -1     
  Misses        920      920              
Flag Coverage Δ
eof_execution_spec_tests 16.65% <100.00%> (-0.01%) ⬇️
ethereum_tests 26.99% <100.00%> (-0.01%) ⬇️
ethereum_tests_silkpre 18.70% <33.33%> (+<0.01%) ⬆️
execution_spec_tests 17.98% <33.33%> (+<0.01%) ⬆️
unittests 89.67% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
lib/evmone/eof.cpp 85.66% <100.00%> (-0.03%) ⬇️

@chfast chfast merged commit 8e2e110 into master Jul 4, 2024
26 checks passed
@chfast chfast deleted the eof/magic_refactor branch July 4, 2024 13:17
chfast added a commit that referenced this pull request Jul 23, 2024
Fixes the bug introduced in #947
where reading the version byte is missing the bounds check.
chfast added a commit that referenced this pull request Jul 24, 2024
Fixes the bug introduced in #947
where reading the version byte is missing the bounds check.
chfast added a commit that referenced this pull request Jul 24, 2024
Fixes the bug introduced in #947
where reading the version byte is missing the bounds check.

This bug is hard to detect when `std::string` is used as the test
container so the unit test framework has been modified to make it easier.

Found by a fuzzer.
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.

2 participants