mirror of https://github.com/google/oss-fuzz.git
16 lines
216 B
Go
16 lines
216 B
Go
|
package gonidsfuzz
|
||
|
|
||
|
import (
|
||
|
"github.com/google/gonids"
|
||
|
)
|
||
|
|
||
|
func Fuzz(data []byte) int {
|
||
|
r, err := gonids.ParseRule(string(data))
|
||
|
if err != nil {
|
||
|
// Handle parse error
|
||
|
return 0
|
||
|
}
|
||
|
r.OptimizeHTTP()
|
||
|
return 1
|
||
|
}
|