mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-15 16:07:51 +03:00
ac4cc171a5
They have been acquired by GitLab and are going to remove all data for previous projects. See https://github.com/valyala/fasthttp/issues/838
24 lines
285 B
Go
24 lines
285 B
Go
// +build gofuzz
|
|
|
|
package fuzz
|
|
|
|
import (
|
|
"bytes"
|
|
|
|
"github.com/valyala/fasthttp"
|
|
)
|
|
|
|
func Fuzz(data []byte) int {
|
|
u := fasthttp.AcquireURI()
|
|
defer fasthttp.ReleaseURI(u)
|
|
|
|
u.UpdateBytes(data)
|
|
|
|
w := bytes.Buffer{}
|
|
if _, err := u.WriteTo(&w); err != nil {
|
|
return 0
|
|
}
|
|
|
|
return 1
|
|
}
|