...
Code Block | ||
---|---|---|
| ||
size_t count_whitespace(char const *s) { char const *t = s; while (isspace((unsigned char)*t)) ++t; return t - s; } |
Risk Assessment
Passing values to character handling functions that cannot be represented as an unsigned char may result in unintended program behavior.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
INT37-C | 1 (low) | 1 (unlikely) | 3 (low) | P3 | L3 |
...
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" |