Skip to content

Commit

Permalink
Create data_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
pic4xiu authored Jun 13, 2023
1 parent 3c57843 commit fcb8595
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions gofuzz/data_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package main

import (
"bytes"
"fmt"
"image"
_ "image/png"
"testing"
)

func FuzzReverse(f *testing.F) {
// testcases := []string{"10.0.0.1/70", "10.0.0.5-10", "192.168.1.*", "192.168.10.0/24"}
// for _, tc := range testcases {
// f.Add(tc) // Use f.Add to provide a seed corpus
// }
f.Fuzz(func(t *testing.T, data []byte) {
fmt.Println(data)
file := bytes.NewReader(data)
_, _, err1 := image.Decode(file)
if err1 != nil {
return
}
})
}

0 comments on commit fcb8595

Please sign in to comment.