From a357d99624f45b2c2d1b426663ba836dab0ac950 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 3 Oct 2019 15:58:52 +0300 Subject: [PATCH] vm: introduce MaxArraySize constant This is both for #373 and for interop functions that have to check some inputs. --- pkg/vm/vm.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go index 6ecfbd9e4..a12516ee3 100644 --- a/pkg/vm/vm.go +++ b/pkg/vm/vm.go @@ -24,8 +24,10 @@ var ( ) const ( - maxSHLArg = 256 - minSHLArg = -256 + // MaxArraySize is the maximum array size allowed in the VM. + MaxArraySize = 1024 + maxSHLArg = 256 + minSHLArg = -256 ) // VM represents the virtual machine.