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

Crash formatting null strings #3706

Closed
dikan-i opened this issue Nov 8, 2023 · 1 comment
Closed

Crash formatting null strings #3706

dikan-i opened this issue Nov 8, 2023 · 1 comment

Comments

@dikan-i
Copy link

dikan-i commented Nov 8, 2023

Seems to be a regression from v6.0

const char* const nullString = nullptr;
fmt::format("{}", nullString); // ok
fmt::format("{:s}", nullString); // crash

Cause: construction of basic_string_view from nullptr:
https://github.com/fmtlib/fmt/blob/master/include/fmt/format.h#L2346

@vitaut
Copy link
Contributor

vitaut commented Nov 16, 2023

Fixed in 649fe0f. Thanks for reporting.

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