forked from TrueCloudLab/neoneo-go
stackitem: limit buffer/bytearray reads upon deserialization
This is not the way it's done in C#, but that's the most sensible approach to me.
This commit is contained in:
parent
64e9775707
commit
0120a8f239
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ func DecodeBinaryStackItem(r *io.BinReader) Item {
|
||||||
|
|
||||||
switch t {
|
switch t {
|
||||||
case ByteArrayT, BufferT:
|
case ByteArrayT, BufferT:
|
||||||
data := r.ReadVarBytes()
|
data := r.ReadVarBytes(MaxSize)
|
||||||
return NewByteArray(data)
|
return NewByteArray(data)
|
||||||
case BooleanT:
|
case BooleanT:
|
||||||
var b = r.ReadBool()
|
var b = r.ReadBool()
|
||||||
|
|
Loading…
Reference in a new issue