chrono icon indicating copy to clipboard operation
chrono copied to clipboard

Panic with TZ="pBB24"

Open pitdicker opened this issue 1 year ago • 1 comments

Gave my first try fuzzing chrono, starting with setting the TZ env variable. It came up with "pBB24"

We accept an offset of +24 hours for a time zone named "pBB". But in chrono we define that an offset can be at most 23:59:59, and return LocalResult::None (and then panic) when trying to do anything with Local.

pitdicker avatar Mar 02 '24 20:03 pitdicker

The fix is to change a 24 to 23 in tz_info::rule::parse_offset.

pitdicker avatar Mar 02 '24 21:03 pitdicker