aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encoding_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-03-05 12:07:51 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-03-05 12:10:27 +0100
commitbd5df8f49be704519466f7165c3e8fef85b3f566 (patch)
treea31d6d330d62987ca8e67a1fcfb88656f4201db3 /prog/encoding_test.go
parentf027f1a3f7c45bafd7f99776548ef73ba3cc22ec (diff)
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.
Diffstat (limited to 'prog/encoding_test.go')
-rw-r--r--prog/encoding_test.go20
1 files changed, 20 insertions, 0 deletions
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 {