vm/stackitem: limit reads for bigint values
They can't exceed 33 bytes.
This commit is contained in:
parent
f45c032eff
commit
64e9775707
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ func DecodeBinaryStackItem(r *io.BinReader) Item {
|
||||||
var b = r.ReadBool()
|
var b = r.ReadBool()
|
||||||
return NewBool(b)
|
return NewBool(b)
|
||||||
case IntegerT:
|
case IntegerT:
|
||||||
data := r.ReadVarBytes()
|
data := r.ReadVarBytes(bigint.MaxBytesLen)
|
||||||
num := bigint.FromBytes(data)
|
num := bigint.FromBytes(data)
|
||||||
return NewBigInteger(num)
|
return NewBigInteger(num)
|
||||||
case ArrayT, StructT:
|
case ArrayT, StructT:
|
||||||
|
|
Loading…
Reference in a new issue