https://github.com/posener/fuzzing
Easy fuzzing with go-fuzz
https://github.com/posener/fuzzing
dvyukov fuzz fuzzing go go-fuzz golang testing
Last synced: 6 days ago
JSON representation
Easy fuzzing with go-fuzz
- Host: GitHub
- URL: https://github.com/posener/fuzzing
- Owner: posener
- License: apache-2.0
- Created: 2020-01-23T20:48:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T11:14:59.000Z (almost 6 years ago)
- Last Synced: 2025-06-17T02:45:05.236Z (9 months ago)
- Topics: dvyukov, fuzz, fuzzing, go, go-fuzz, golang, testing
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fuzzing
[](https://codecov.io/gh/posener/fuzzing)
[](http://pkg.go.dev/github.com/posener/fuzzing)
Package fuzzing enables easy fuzzing with [go-fuzz](https://github.com/dvyukov/go-fuzz).
The `Fuzz` object provides functions for generating consistent Go primitive values from a given
fuzzed bytes slice. The generated values are promised to be consistent from identical slices.
They are also correlated to the given fuzzed slice to enable fuzzing exploration.
For an example on how to use this library with go-fuzz, see [./example_fuzz.go](./example_fuzz.go)
In order to test the example, run in the project directory:
```go
$ go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
$ go-fuzz-build
$ go-fuzz -testoutput
```
## Examples
```golang
f := New([]byte{1, 2, 3})
i := f.Int()
fmt.Println(i)
```
Output:
```
3851489450890114710
```
---
Readme created from Go doc with [goreadme](https://github.com/posener/goreadme)