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 in floating point format #1124

Closed
pauldreik opened this issue Apr 19, 2019 · 1 comment
Closed

crash in floating point format #1124

pauldreik opened this issue Apr 19, 2019 · 1 comment

Comments

@pauldreik
Copy link
Contributor

Hi,
I did a very basic fuzzing attempt and found a segmentation fault. The following code crashes both with gcc and clang:

#include <fmt/core.h>

int main() {
float item=9.57489014e-4;
std::string message = fmt::format("\x7b\x3a\x2e\x30\x7d", item);
}

It also crashed for double (not necessarily with the same number), suspect it is the same issue.

@vitaut
Copy link
Contributor

vitaut commented Apr 19, 2019

Great catch, thanks! Fixed in 736aa34.

@vitaut vitaut closed this as completed Apr 19, 2019
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