armor: add FuzzMalleability test

This commit is contained in:
Filippo Valsorda
2022-07-03 12:48:48 +02:00
parent a5d38ae6ce
commit 891be91d42
2 changed files with 56 additions and 0 deletions
+4
View File
@@ -54,6 +54,10 @@ func FuzzMalleability(f *testing.F) {
if err != nil {
f.Fatal(err)
}
_, contents, ok := bytes.Cut(contents, []byte("\n\n"))
if !ok {
f.Fatal("testkit file without header")
}
f.Add(contents)
}
f.Fuzz(func(t *testing.T, data []byte) {