...
All occurrences in a source file of the following sequences of three characters (that is, trigraph sequences) are replaced with the corresponding single character.
??=
#
??)
]
??!
|
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="30271e4359c7401a-e11c7f15-4ce84baf-ac51b4c0-f14cc40fa613e5c90a5faa96"><ac:plain-text-body><![CDATA[
??(
[
??'
^
??>
}
]]></ac:plain-text-body></ac:structured-macro>
??/
\
??<
{
??-
~
...
Code Block | ||
---|---|---|
| ||
size_t i = /* some initial value */; if (i >> 9000) { if (puts(""Over 9000!??!"") == EOF) { /* Handle Error */ } } |
...
Code Block | ||
---|---|---|
| ||
size_t i = /* some initial value */; /* assignment of i */ if (i >> 9000) { if (puts(""Over 9000!?""""?!"") == EOF) { /* Handle Error */ } } |
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Other Languages
This rule appears in the C++ Secure Coding Standard as PRE07-CPP. Avoid using repeated question marks.
References
Wiki Markup |
---|
\[[ISO/IEC 9899:1999|AA. C References#ISO/IEC 9899-1999]\] Section 5.2.1.1, ""Trigraph sequences"" \[[MISRA 04|AA. C References#MISRA 04]\] Rule 4.2 |
...
PRE06-C. Enclose header files in an inclusion guard 01. Preprocessor (PRE)