mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-14 01:24:04 -08:00
2b02fcb0cb
Update vendor `github.com/miekg/dns` to `v1.0.4` release. * Add dependent vendor `golang.org/x/crypto/ed25519`. * Add dependent vendor `golang.org/x/crypto/ed25519/internal/edwards25519`. * Add dependent vendor `golang.org/x/net/bpf`. * Add dependent vendor `golang.org/x/net/internal/iana`. * Add dependent vendor `golang.org/x/net/internal/socket`. * Add dependent vendor `golang.org/x/net/ipv4`. * Add dependent vendor `golang.org/x/net/ipv6`.
24 lines
307 B
Go
24 lines
307 B
Go
// +build fuzz
|
|
|
|
package dns
|
|
|
|
func Fuzz(data []byte) int {
|
|
msg := new(Msg)
|
|
|
|
if err := msg.Unpack(data); err != nil {
|
|
return 0
|
|
}
|
|
if _, err := msg.Pack(); err != nil {
|
|
return 0
|
|
}
|
|
|
|
return 1
|
|
}
|
|
|
|
func FuzzNewRR(data []byte) int {
|
|
if _, err := NewRR(string(data)); err != nil {
|
|
return 0
|
|
}
|
|
return 1
|
|
}
|