diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index fe354677b..fe9be92e5 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -912,6 +912,9 @@ func (bc *Blockchain) handleNotification(note *state.NotificationEvent, d *dao.C if !ok { return } + if len(bs) > bigint.MaxBytesLen { + return // Not a proper number. + } amount = bigint.FromBytes(bs) } bc.processNEP17Transfer(d, h, b, note.ScriptHash, from, to, amount)