...
Code Block | ||
---|---|---|
| ||
int privileges; if (invalid_login()) { if (allow_guests()) { privileges = GUEST; } } else { privileges = ADMINISTRATOR; } |
Risk Assessment
Guideline | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
EXP52-JG | medium | probable | medium | P8 | L2 |
Related Guidelines
Applicability
Not enclosing the bodies of CERT C Secure Coding Standard: EXP19-C. Use braces for the body of an if
, for
, or while
statement statements in braces makes code maintenance error prone.
Bibliography
[GNU 2010] | |
Rule 76: Use block statements instead of expression statements in control flow constructs |
...