mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-13 15:45:01 +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 {
|
if !ok {
|
||||||
return nil, errors.New("wrong amount type")
|
return nil, errors.New("wrong amount type")
|
||||||
}
|
}
|
||||||
|
if len(bs) > amountSize {
|
||||||
|
return nil, errors.New("integer overflow")
|
||||||
|
}
|
||||||
amount = emit.BytesToInt(bs)
|
amount = emit.BytesToInt(bs)
|
||||||
}
|
}
|
||||||
toAddr := parseUint160(to)
|
toAddr := parseUint160(to)
|
||||||
|
|
Loading…
Reference in a new issue