Update Base64LineBreaker fuzzing tests in b64linebreaker_test.go

Updated the fuzzing tests in the `Base64LineBreaker_Write` function. The change specifically converts integer bytes from decimal to octal. This ensures proper testing of a wider range of input scenarios, increasing the reliability and robustness of the code.
This commit is contained in:
Winni Neessen 2024-03-23 16:51:18 +01:00
parent dae7d80759
commit a4918210f1
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D

View file

@ -466,7 +466,7 @@ func (e errorWriter) Close() error {
func FuzzBase64LineBreaker_Write(f *testing.F) { func FuzzBase64LineBreaker_Write(f *testing.F) {
f.Add([]byte("abc")) f.Add([]byte("abc"))
f.Add([]byte("def")) f.Add([]byte("def"))
f.Add([]uint8{00, 01, 02, 30, 255}) f.Add([]uint8{0o0, 0o1, 0o2, 30, 255})
buf := bytes.Buffer{} buf := bytes.Buffer{}
bw := bufio.NewWriter(&buf) bw := bufio.NewWriter(&buf)
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {