1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00
Files
go-chasquid-smtp/internal/aliases/fuzz.go
2018-03-30 22:33:53 +01:00

23 lines
366 B
Go

// Fuzz testing for package aliases.
// +build gofuzz
package aliases
import "bytes"
func Fuzz(data []byte) int {
interesting := 0
aliases, _ := parseReader("domain", bytes.NewReader(data))
// Mark cases with actual aliases as more interesting.
for _, rcpts := range aliases {
if len(rcpts) > 0 {
interesting = 1
break
}
}
return interesting
}