diff --git a/core/vm/eips.go b/core/vm/eips.go index cb4851e32f..dcb4943669 100644 --- a/core/vm/eips.go +++ b/core/vm/eips.go @@ -823,6 +823,9 @@ func opCallf(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by if scope.Stack.len()+int(typ.MaxStackHeight) >= 1024 { return nil, fmt.Errorf("stack overflow") } + if len(scope.ReturnStack) >= 1024 { + return nil, fmt.Errorf("return stack overflow") + } retCtx := &ReturnContext{ Section: scope.CodeSection, Pc: *pc + 3,