mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-02-14 15:40:24 +00:00
internal/fuzztest: set cap to len on test byte slice
Change-Id: I807995997fe7addf005eb639b0d4843cfb58f52b Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/218018 Reviewed-by: Herbie Ong <herbie@google.com>
This commit is contained in:
parent
0f783d864b
commit
4eeab367ab
@ -38,6 +38,7 @@ func Test(t *testing.T, fuzz func(b []byte) int) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
b = b[:len(b):len(b)] // set cap to len
|
||||
fuzz(b)
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user