Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic in FromStr<DateTime<Utc>> #1253

Closed
jjbayer opened this issue Sep 4, 2023 · 4 comments
Closed

Panic in FromStr<DateTime<Utc>> #1253

jjbayer opened this issue Sep 4, 2023 · 4 comments

Comments

@jjbayer
Copy link

jjbayer commented Sep 4, 2023

Special characters in date strings produce a panic (reproduced in 0.4.27 and 0.4.28):

#[test]
fn chrono_panics() {
    "2015-02-18T23:16:9.15øøø".parse::<DateTime<Utc>>();
}

The bug was possibly introduced in #1145, which uses unchecked string slicing.

@pitdicker
Copy link
Collaborator

Thank you for the report, I should know better than to do arbitrary string slicing.
Will be fixed with #1254.

@jjbayer
Copy link
Author

jjbayer commented Sep 5, 2023

@pitdicker Awesome, thank you! Any chance this will make it into a release soon?

@pitdicker
Copy link
Collaborator

I hope this week, @djc makes the call.

@pitdicker
Copy link
Collaborator

Published as 0.4.29.

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

No branches or pull requests

2 participants