Skip to content

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

@fukanchik

Description

@fukanchik
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions