Skip to content

Conversation

@thevilledev
Copy link
Contributor

@thevilledev thevilledev commented Jan 7, 2026

Motivation

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)

Further comments

The fuzz input in this case had a form of date(' ',' ÿ ÿ ',' \x00 '). The date builtin calls time.LoadLocation like:

			if len(args) == 3 {
				layout := args[1].(string)
				timeZone := args[2].(string)
				tz, err := time.LoadLocation(timeZone)
				if err != nil {
					return nil, err
				}
				t, err := time.ParseInLocation(layout, date, tz)

I would assume timezone builtin is affected too.

See this Go playground link how time.LoadLocation works.

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 <ville@vesilehto.fi>
@thevilledev thevilledev marked this pull request as ready for review January 7, 2026 19:18
@antonmedv antonmedv merged commit de0da09 into expr-lang:master Jan 7, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants