forked from nihonium/linux-auth
final bad try
This commit is contained in:
parent
b540edbe1e
commit
fa5e0287e5
7 changed files with 106 additions and 1 deletions
38
golang-fuzz/auth_fuzz_golangfuzz_test.go
Normal file
38
golang-fuzz/auth_fuzz_golangfuzz_test.go
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// Code generated by golang-fuzz; DO NOT EDIT.
|
||||
|
||||
package my_golang_fuzz
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Fuzz_(f *testing.F) {
|
||||
loadTestCases(f)
|
||||
f.Fuzz(func(_ *testing.T, input []byte) { Fuzz(input) })
|
||||
}
|
||||
|
||||
func loadTestCases(f *testing.F) {
|
||||
dir, err := os.ReadDir(`corpus`)
|
||||
if err != nil {
|
||||
f.Logf(`Running without adding corpus: %s`, err)
|
||||
return
|
||||
}
|
||||
|
||||
if len(dir) == 0 {
|
||||
f.Log(`Running without adding corpus: directory is empty`)
|
||||
}
|
||||
|
||||
for _, corpus := range dir {
|
||||
if corpus.IsDir() {
|
||||
continue
|
||||
}
|
||||
|
||||
input, err := os.ReadFile(filepath.Join(`corpus`, corpus.Name()))
|
||||
if err != nil {
|
||||
f.Logf(`Could not read corpus input %s: %s`, corpus.Name(), err)
|
||||
}
|
||||
f.Add(input)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue