From 63c7469dfd62fcf4689c500d01283007e7643297 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 7 Oct 2020 18:29:19 +0300 Subject: [PATCH] manifest: limit its size when decoding --- pkg/smartcontract/manifest/manifest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/smartcontract/manifest/manifest.go b/pkg/smartcontract/manifest/manifest.go index d7a63aeed..40680dad1 100644 --- a/pkg/smartcontract/manifest/manifest.go +++ b/pkg/smartcontract/manifest/manifest.go @@ -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 {