mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-22 00:16:08 +01:00
21 lines
287 B
Go
21 lines
287 B
Go
|
//+build gofuzz
|
||
|
|
||
|
package genetlink
|
||
|
|
||
|
func Fuzz(data []byte) int {
|
||
|
return fuzzMessage(data)
|
||
|
}
|
||
|
|
||
|
func fuzzMessage(data []byte) int {
|
||
|
var m Message
|
||
|
if err := (&m).UnmarshalBinary(data); err != nil {
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
if _, err := m.MarshalBinary(); err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
return 1
|
||
|
}
|