gix-date can create non-utf8 string with `TimeBuf::as_str`
Moderate severity
GitHub Reviewed
Published
Jan 5, 2026
to the GitHub Advisory Database
•
Updated Jan 5, 2026
Description
Published to the GitHub Advisory Database
Jan 5, 2026
Reviewed
Jan 5, 2026
Last updated
Jan 5, 2026
The function
gix_date::parse::TimeBuf::as_strcan create an illegal string containing non-utf8 characters. This violates the safety invariant ofTimeBufand can lead to undefined behavior when consuming the string.The bug can be prevented by adding
str::from_utf8to the functionTimeBuf::write.References