...
Code Block | ||
---|---|---|
| ||
size_t count_whitespace(char const char *s) { char const char *t = s; while (isspace(*t)) /* possibly *t < 0 */ ++t; return t - s; } |
...
Code Block | ||
---|---|---|
| ||
size_t count_whitespace(const unsigned *s) {
const unsigned char *t = s;
while (isspace(*t))
++t;
return t - s;
}
|
...
Code Block | ||
---|---|---|
| ||
size_t count_whitespace(char const char *s) { char const char *t = s; while (isspace((unsigned char)*t)) ++t; return t - s; } |
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
INT37-C | 1 (low) | 1 (unlikely) | 3 (low) | P3 | L3 |
Related Vulnerabilities
Search for Examples of vulnerabilities resulting from the violation of this rule can be found on the CERT website.
References
Wiki Markup |
---|
\[[ISO/IEC 9899-1999|AA. C References#ISO/IEC 9899-1999]] Section 7.4, "Character handling <ctype.h>" \[[Kettlewell 02|AA. C References#Kettle 02]] Section 1.1, "<ctype.h> And Characters Types" |