From aa24cfb344b1b3eaef7217d996359023cd72ba28 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 14 Sep 2026 20:10:01 +0200 Subject: plan 8: fuzz decoders; fold ẞ and invalid UTF-8 correctly, refuse non-UTF-8 paths in krino new MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/extract/fuzz_test.go | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 internal/extract/fuzz_test.go (limited to 'internal/extract') diff --git a/internal/extract/fuzz_test.go b/internal/extract/fuzz_test.go new file mode 100644 index 0000000..5f707d2 --- /dev/null +++ b/internal/extract/fuzz_test.go @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package extract + +import ( + "archive/zip" + "bytes" + "context" + "os" + "path/filepath" + "testing" +) + +// FuzzStripMarkup: decoding and stripping any bytes as HTML never panics. +func FuzzStripMarkup(f *testing.F) { + for _, s := range []string{"

a & b

", "y", "