From bb222759a34f761edcb682cd96ccbe4f83903803 Mon Sep 17 00:00:00 2001 From: Ville Vesilehto Date: Wed, 7 Jan 2026 20:52:20 +0200 Subject: [PATCH] fix(fuzz): handle bare "invalid argument" OSS-Fuzz finding #471520156 had an assert caused by the time.LoadLocation outputting "invalid argument" for a null byte argument. The fuzz test was already intentionally skipping "invalid argument for" as a regex, which didn't match this err string. Changes: - Simplify regex to match both "invalid argument for X" and bare form - Remove redundant "operator in" pattern (covered by wildcard variant) Signed-off-by: Ville Vesilehto --- test/fuzz/fuzz_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/fuzz/fuzz_test.go b/test/fuzz/fuzz_test.go index 78f910db9..c7583b7bf 100644 --- a/test/fuzz/fuzz_test.go +++ b/test/fuzz/fuzz_test.go @@ -26,7 +26,7 @@ func FuzzExpr(f *testing.F) { regexp.MustCompile(`error parsing regexp`), regexp.MustCompile(`integer divide by zero`), regexp.MustCompile(`interface conversion`), - regexp.MustCompile(`invalid argument for .*`), + regexp.MustCompile(`invalid argument`), regexp.MustCompile(`invalid character`), regexp.MustCompile(`invalid operation`), regexp.MustCompile(`invalid duration`), @@ -46,7 +46,6 @@ func FuzzExpr(f *testing.F) { regexp.MustCompile(`reflect: string index out of range`), regexp.MustCompile(`strings: negative Repeat count`), regexp.MustCompile(`strings: illegal bytes to escape`), - regexp.MustCompile(`operator "in" not defined on int`), regexp.MustCompile(`invalid date .*`), regexp.MustCompile(`cannot parse .* as .*`), regexp.MustCompile(`operator "in" not defined on .*`),