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

First argument to printf should be a literal: won't build with -Wformat-security, -Werror=format-security #496

Closed
SomeoneSerge opened this issue Mar 25, 2023 · 1 comment

Comments

@SomeoneSerge
Copy link
Collaborator

https://github.com/ggerganov/llama.cpp/blob/e899bf54b291e8c84173a0e534a2c262f3f63229/main.cpp#L481

This won't build with https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-security
The safe call would be printf("%s", buffer.c_str())

@SomeoneSerge
Copy link
Collaborator Author

Solved with 6b6dbc8

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

1 participant