...
Furthermore, the definition of programmer-defined types may change, which creates a problem when these types are used with formatted output functions, such as printf()
, and formatted input functions, such as scanf()
. (See FIO00FIO47-C. Take care when creating Use valid format strings.)
The C intmax_t
and uintmax_t
types can represent any value representable by any other integer types of the same signedness. (See INT00-C. Understand the data model used by your implementation(s).) This capability allows conversion between programmer-defined integer types (of the same signedness) and intmax_t
and uintmax_t
:
...
Noncompliant Code Example (scanf()
)
The following This noncompliant code example reads an unsigned long long
value from standard input and stores the result in x
, which is of a programmer-defined integer type:
...
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...