From d2f452c2400f8fdabb8a87d9297ac602edfd0374 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 15 Jul 2020 13:53:24 +0300 Subject: [PATCH] core: adjust System.Contract.CallEx interop Part of #1055 --- pkg/core/interop_system.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/core/interop_system.go b/pkg/core/interop_system.go index 3d84b7d24..06632c813 100644 --- a/pkg/core/interop_system.go +++ b/pkg/core/interop_system.go @@ -422,6 +422,9 @@ func contractCallEx(ic *interop.Context, v *vm.VM) error { method := v.Estack().Pop().Item() args := v.Estack().Pop().Item() flags := smartcontract.CallFlag(int32(v.Estack().Pop().BigInt().Int64())) + if flags&^smartcontract.All != 0 { + return errors.New("call flags out of range") + } return contractCallExInternal(ic, v, h, method, args, flags) }