mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
core/vm: fix opExt{*}Call address space extension
This commit is contained in:
parent
03b75144b9
commit
218c887878
1 changed files with 6 additions and 0 deletions
|
|
@ -1130,6 +1130,9 @@ func opExtDelegateCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeCont
|
||||||
// Pop other call parameters.
|
// Pop other call parameters.
|
||||||
addr, inOffset, inSize := stack.pop(), stack.pop(), stack.pop()
|
addr, inOffset, inSize := stack.pop(), stack.pop(), stack.pop()
|
||||||
toAddr := common.Address(addr.Bytes20())
|
toAddr := common.Address(addr.Bytes20())
|
||||||
|
if addr.ByteLen() > 20 {
|
||||||
|
return nil, errors.New("address space extension")
|
||||||
|
}
|
||||||
// safe a memory alloc
|
// safe a memory alloc
|
||||||
temp := addr
|
temp := addr
|
||||||
// Get arguments from the memory.
|
// Get arguments from the memory.
|
||||||
|
|
@ -1173,6 +1176,9 @@ func opExtStaticCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContex
|
||||||
// Pop other call parameters.
|
// Pop other call parameters.
|
||||||
addr, inOffset, inSize := stack.pop(), stack.pop(), stack.pop()
|
addr, inOffset, inSize := stack.pop(), stack.pop(), stack.pop()
|
||||||
toAddr := common.Address(addr.Bytes20())
|
toAddr := common.Address(addr.Bytes20())
|
||||||
|
if addr.ByteLen() > 20 {
|
||||||
|
return nil, errors.New("address space extension")
|
||||||
|
}
|
||||||
// safe a memory alloc
|
// safe a memory alloc
|
||||||
temp := addr
|
temp := addr
|
||||||
// Get arguments from the memory.
|
// Get arguments from the memory.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue