Skip to content

Commit

Permalink
Merge pull request #339 from torquem-ch/win_out_of_range
Browse files Browse the repository at this point in the history
advanced: Prevent invalid memory subscript index
  • Loading branch information
chfast authored Jun 2, 2021
2 parents 128d137 + dcee38a commit 3a2dbeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit 3a2dbeb

Please sign in to comment.