Mohammed Al Sahaf
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
5 deletions
-
caddyconfig/caddyfile/parse_fuzz.go
|
@ -17,12 +17,8 @@ |
|
|
|
|
|
|
|
|
package caddyfile |
|
|
package caddyfile |
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
|
"bytes" |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func FuzzParseCaddyfile(data []byte) (score int) { |
|
|
func FuzzParseCaddyfile(data []byte) (score int) { |
|
|
sb, err := Parse("Caddyfile", bytes.NewReader(data)) |
|
|
sb, err := Parse("Caddyfile", data) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
// if both an error is received and some ServerBlocks,
|
|
|
// if both an error is received and some ServerBlocks,
|
|
|
// then the parse was able to parse partially. Mark this
|
|
|
// then the parse was able to parse partially. Mark this
|
|
|