]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] internal/fuzz: write a newline to the end of a corpus file
authorKatie Hockman <katie@golang.org>
Fri, 10 Sep 2021 15:05:29 +0000 (11:05 -0400)
committerKatie Hockman <katie@golang.org>
Fri, 10 Sep 2021 19:27:54 +0000 (19:27 +0000)
commitd106089fa6aa69cc1b547c68ca19d84f28062c71
treebc6c1328910788843d8adaff1d9ce3c974e5a1b1
parent363f2f3df99f3edd15609cc6bea2a2c6f423ce2c
[dev.fuzz] internal/fuzz: write a newline to the end of a corpus file

If someone manually adds/alters a corpus file to add
extra spacing or remove the final newline, the file
can still be decoded. However, this change ensures that
the fuzzing engine correctly writes the final newline.

Fixes golang/go#48130

Change-Id: Ib5556d4a6e4e0bfd9bc2edab357b7c25bedfd176
Reviewed-on: https://go-review.googlesource.com/c/go/+/349055
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/testdata/script/test_fuzz_minimize.txt
src/internal/fuzz/encoding.go
src/internal/fuzz/encoding_test.go