mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
core/vm: check for returnStack overflow in opCallf
This commit is contained in:
parent
e1b9f4a6f5
commit
3d8ca3c526
1 changed files with 3 additions and 0 deletions
|
|
@ -823,6 +823,9 @@ func opCallf(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by
|
||||||
if scope.Stack.len()+int(typ.MaxStackHeight) >= 1024 {
|
if scope.Stack.len()+int(typ.MaxStackHeight) >= 1024 {
|
||||||
return nil, fmt.Errorf("stack overflow")
|
return nil, fmt.Errorf("stack overflow")
|
||||||
}
|
}
|
||||||
|
if len(scope.ReturnStack) >= 1024 {
|
||||||
|
return nil, fmt.Errorf("return stack overflow")
|
||||||
|
}
|
||||||
retCtx := &ReturnContext{
|
retCtx := &ReturnContext{
|
||||||
Section: scope.CodeSection,
|
Section: scope.CodeSection,
|
||||||
Pc: *pc + 3,
|
Pc: *pc + 3,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue