We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
format_to_n unsafe when arguments exceeds some size (256?)
Relates to closed #2028 (#1996)
Following peace of code
#include <fmt/format.h> int main() { char buff[80]; const char *a = "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"; fmt::format_to_n(std::begin(buff), 79,FMT_STRING("{} "), a); fmt::print("done"); return 0; }
build with following rule: -fstack-protector-strong
gives
*** stack smashing detected ***: terminated
The text was updated successfully, but these errors were encountered:
Fix an overflow in format_to_n (#2029)
66c3f1d
2c734c9
Great catch, thanks! Fixed in 2c734c9.
Sorry, something went wrong.
b8957f5
No branches or pull requests
format_to_n unsafe when arguments exceeds some size (256?)
Relates to closed #2028 (#1996)
Following peace of code
build with following rule:
-fstack-protector-strong
gives
The text was updated successfully, but these errors were encountered: