vm: reduce maximum stckitem size
To prevent possible DoS. Port the https://github.com/neo-project/neo-vm/pull/514, close #3170. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
dbd647e3a6
commit
b0cdae4666
2 changed files with 2 additions and 2 deletions
|
@ -383,7 +383,7 @@ func TestToJSONWithTypesBadCases(t *testing.T) {
|
|||
// until the necessary branch is covered #ididthemath.
|
||||
arr := NewArray([]Item{
|
||||
NewByteArray(bigBuf[:MaxSize/4*3-70]),
|
||||
NewBigInteger(big.NewInt(1234)),
|
||||
NewBigInteger(big.NewInt(123456)),
|
||||
})
|
||||
_, err := ToJSONWithTypes(arr)
|
||||
require.ErrorIs(t, err, errTooBigSize)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue