diff options
author | Sam Whited <sam@samwhited.com> | 2022-03-11 13:22:29 -0500 |
---|---|---|
committer | Sam Whited <sam@samwhited.com> | 2022-03-15 09:26:50 -0400 |
commit | 2d95d4d069124df4a4e2473fc23ad3feed19905d (patch) | |
tree | 4e53db9f07cfda2e17745a6870f294db2d4eb756 /vendor/github.com/pion/rtcp/fuzz.go | |
parent | c8dc651f72c09ce252cee729bfc09d8ca6744c36 (diff) |
Remove vendor from git
Previously we saved the vendor tree in version control, making any
commit that changed a dependency rather large.
Go Modules gives us most of the advantages of vendoring except that if a
dependency which is not stored on the proxy is deleted we would lose
access to it.
For now, we can remove the vendor tree and when we get CI working again
we can possibly generate and save the vendor tree as a build artifact.
Signed-off-by: Sam Whited <sam@samwhited.com>
Diffstat (limited to 'vendor/github.com/pion/rtcp/fuzz.go')
-rw-r--r-- | vendor/github.com/pion/rtcp/fuzz.go | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/vendor/github.com/pion/rtcp/fuzz.go b/vendor/github.com/pion/rtcp/fuzz.go deleted file mode 100644 index 2ea4fb1..0000000 --- a/vendor/github.com/pion/rtcp/fuzz.go +++ /dev/null @@ -1,51 +0,0 @@ -// +build gofuzz - -package rtcp - -import ( - "bytes" - "io" -) - -// Fuzz implements a randomized fuzz test of the rtcp -// parser using go-fuzz. -// -// To run the fuzzer, first download go-fuzz: -// `go get github.com/dvyukov/go-fuzz/...` -// -// Then build the testing package: -// `go-fuzz-build github.com/pion/webrtc` -// -// And run the fuzzer on the corpus: -// ``` -// mkdir workdir -// -// # optionally add a starter corpus of valid rtcp packets. -// # the corpus should be as compact and diverse as possible. -// cp -r ~/my-rtcp-packets workdir/corpus -// -// go-fuzz -bin=ase-fuzz.zip -workdir=workdir -// ```` -func Fuzz(data []byte) int { - r := NewReader(bytes.NewReader(data)) - for { - _, data, err := r.ReadPacket() - if err == io.EOF { - break - } - if err != nil { - return 0 - } - - packet, err := Unmarshal(data) - if err != nil { - return 0 - } - - if _, err := packet.Marshal(); err != nil { - return 0 - } - } - - return 1 -} |