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

"%" PRIi64 is reported as non-constant format string #9

Open
fukanchik opened this issue Mar 22, 2018 · 0 comments
Open

"%" PRIi64 is reported as non-constant format string #9

fukanchik opened this issue Mar 22, 2018 · 0 comments

Comments

@fukanchik
Copy link

int64_t x = 123;
sprintf(buffer, "%" PRIi64, x);

produces the following warning

Check to be sure that the non-constant format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle.

PRIi64 is defined in standard header <inttypes.h> as a constant string.

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