manifest: limit its size when decoding

This commit is contained in:
Roman Khimov 2020-10-07 18:29:19 +03:00
parent f318e573d4
commit 63c7469dfd

View file

@ -184,7 +184,7 @@ func (m *Manifest) EncodeBinary(w *io.BinWriter) {
// DecodeBinary implements io.Serializable.
func (m *Manifest) DecodeBinary(r *io.BinReader) {
data := r.ReadVarBytes()
data := r.ReadVarBytes(MaxManifestSize)
if r.Err != nil {
return
} else if err := json.Unmarshal(data, m); err != nil {