vm/stackitem: limit reads for bigint values

They can't exceed 33 bytes.
This commit is contained in:
Roman Khimov 2020-10-07 23:07:10 +03:00
parent f45c032eff
commit 64e9775707

View file

@ -104,7 +104,7 @@ func DecodeBinaryStackItem(r *io.BinReader) Item {
var b = r.ReadBool()
return NewBool(b)
case IntegerT:
data := r.ReadVarBytes()
data := r.ReadVarBytes(bigint.MaxBytesLen)
num := bigint.FromBytes(data)
return NewBigInteger(num)
case ArrayT, StructT: