From bd5df8f49be704519466f7165c3e8fef85b3f566 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 5 Mar 2018 12:07:51 +0100 Subject: prog: handle excessive args and fields during program parsing Tolerate excessive args and fields during program parsing. This is useful after description changes to not lose corpus. --- prog/encoding_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'prog/encoding_test.go') diff --git a/prog/encoding_test.go b/prog/encoding_test.go index ffe6f4156..7b00e10ab 100644 --- a/prog/encoding_test.go +++ b/prog/encoding_test.go @@ -143,6 +143,26 @@ func TestDeserialize(t *testing.T) { `syz_test$regression2(&(0x7f0000000000)=[0x1, 0x2, 0x3, 0x4, 0x5, 0x6])`, nil, }, + { + `syz_test$excessive_args1(0x0, 0x1, {0x1, &(0x7f0000000000)=[0x1, 0x2]})`, + nil, + }, + { + `syz_test$excessive_args2(0x0, 0x1, {0x1, &(0x7f0000000000)={0x1, 0x2}})`, + nil, + }, + { + `syz_test$excessive_args2(0x0, 0x1, {0x1, &(0x7f0000000000)=nil})`, + nil, + }, + { + `syz_test$excessive_args2(0x0, &(0x7f0000000000), 0x0)`, + nil, + }, + { + `syz_test$excessive_fields1(&(0x7f0000000000)={0x1, &(0x7f0000000000)=[{0x0}, 0x2]}, {0x1, 0x2, [0x1, 0x2]})`, + nil, + }, } buf := make([]byte, ExecBufferSize) for _, test := range tests { -- cgit mrf-deployment