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

Commit

Permalink
fix panic in parity-evm json tracer (#6338)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdetrio authored and gavofyork committed Aug 20, 2017
1 parent 9e4c122 commit 4ccc82b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions evmbin/src/display/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ impl trace::VMTracer for Informant {
self.stack.extend_from_slice(stack_push);

if let Some((pos, data)) = mem_diff {
if self.memory.len() < (pos + data.len()) {
self.memory.resize(pos + data.len(), 0);
}
self.memory[pos..pos + data.len()].copy_from_slice(data);
}

Expand Down

0 comments on commit 4ccc82b

Please sign in to comment.