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

advanced: Prevent invalid memory subscript index #339

Merged
merged 2 commits into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ branches:
- /v\d+\..+/
configuration:
- Release
- Debug
environment:
GITHUB_TOKEN:
secure: OE3TGKRyt/hvk5Gt3DLXvs3Y+F1NLDQAL/bHplDffR+hY2aFg6HrapThKjYo/XX2
Expand All @@ -26,7 +27,7 @@ install:

before_build:
- call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd" -arch=amd64
- cmake -S . -B build -DEVMONE_TESTING=ON -Wno-dev -G "%GENERATOR%" -DCMAKE_INSTALL_PREFIX=C:\install
- cmake -S . -B build -DEVMONE_TESTING=ON -Wno-dev -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DHUNTER_CONFIGURATION_TYPES=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=C:\install

build_script:
- cmake --build build --target package
Expand Down
2 changes: 1 addition & 1 deletion lib/evmone/execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ evmc_result execute(AdvancedExecutionState& state, const AdvancedCodeAnalysis& a
(state.status == EVMC_SUCCESS || state.status == EVMC_REVERT) ? state.gas_left : 0;

return evmc::make_result(
state.status, gas_left, &state.memory[state.output_offset], state.output_size);
state.status, gas_left, state.memory.data() + state.output_offset, state.output_size);
}

evmc_result execute(evmc_vm* /*unused*/, const evmc_host_interface* host, evmc_host_context* ctx,
Expand Down