...
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="723fdcf48fd84d5e-3d8cbaa7-45904711-988eb773-b5b8cc7bf685db456cfff4ed"><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)