mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-12 01:10:36 +00:00
state: reject too big transfers, fix #1900
This commit is contained in:
parent
663f10192f
commit
1202494479
1 changed files with 3 additions and 0 deletions
|
@ -188,6 +188,9 @@ func NEP5TransferFromNotification(ne NotificationEvent, txHash util.Uint256, hei
|
|||
if !ok {
|
||||
return nil, errors.New("wrong amount type")
|
||||
}
|
||||
if len(bs) > amountSize {
|
||||
return nil, errors.New("integer overflow")
|
||||
}
|
||||
amount = emit.BytesToInt(bs)
|
||||
}
|
||||
toAddr := parseUint160(to)
|
||||
|
|
Loading…
Reference in a new issue