...
A maintainer might add a debug statement or other logic , but forget to add opening and closing braces.
...
Code Block | ||
---|---|---|
| ||
int privileges; if (invalid_login()) if (allow_guests()) privileges = GUEST; else privileges = ADMINISTRATOR; |
This is a vulnerability , because unauthorized users can obtain administrator privileges.
...
CERT C Secure Coding Standard: "EXP19-C. Use braces for the body of an if, for, or while statement"
Bibliography
Wiki Markup |
---|
\[[GNU 2010|AA. Bibliography#GNU 10]\] [Coding Standards, Section 5.3, "Clean Use of C Constructs"|http://www.gnu.org/prep/standards/standards.html#Syntactic-Conventions] |
...