Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fix potential huge allocation as a result of validate_block output #13183

Merged
merged 5 commits into from
Jan 20, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update client/executor/wasmtime/src/runtime.rs
  • Loading branch information
bkchr authored Jan 20, 2023
commit 1e3a67737aeda04a5515de4f068e3b92cb3dd4ae
2 changes: 1 addition & 1 deletion client/executor/wasmtime/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ fn extract_output_data(
// Get the size of the WASM memory in bytes.
let memory_size = ctx.as_context().data().memory().data_size(ctx);
if checked_range(output_ptr as usize, output_len as usize, memory_size).is_none() {
return Err(WasmError::Other("output exceeds bounds of wasm memory".into()))?
Err(WasmError::Other("output exceeds bounds of wasm memory".into()))?
}
let mut output = vec![0; output_len as usize];

Expand Down