From e42d32775f94f3162a7d605ddc3273e69be437ff Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 16 Sep 2016 12:00:53 +0200 Subject: [PATCH] Perform bounds check in case call fails. --- src/helpers/traceHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/traceHelper.js b/src/helpers/traceHelper.js index 73424f64dd..4243cbd17a 100644 --- a/src/helpers/traceHelper.js +++ b/src/helpers/traceHelper.js @@ -37,7 +37,7 @@ module.exports = { // if stack empty => this is not a precompiled contract var step = trace[index] if (this.isCallInstruction(step)) { - return trace[index + 1].stack.length !== 0 + return index + 1 < trace.length && trace[index + 1].stack.length !== 0 } else { return false }