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 5573706
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions openpgp/packet/fuzz_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//go:build go1.18
// +build go1.18

package packet

import (
"bytes"
"testing"
)

func FuzzPackets(f *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 5573706

Please sign in to comment.