Skip to content

Commit

Permalink
Add fuzz test of packet reader
Browse files Browse the repository at this point in the history
  • Loading branch information
twiss committed Jun 19, 2023
1 parent fea64f7 commit f954b5f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions openpgp/packet/fuzz_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//go:build go1.18

package packet

import (
"bytes"
"testing"
)

func FuzzPackets(f *testing.F) {

Check failure on line 10 in openpgp/packet/fuzz_test.go

View workflow job for this annotation

GitHub Actions / test-old

undefined: testing.F
f.Add([]byte("\x980\x040000\x16\t+\x06\x01\x04\x01\xdaG\x0f\x01\x00\x00"))
f.Fuzz(func(t *testing.T, data []byte) {
_, _ = Read(bytes.NewReader(data))
})
}

0 comments on commit f954b5f

Please sign in to comment.