SecureCoding-5.43¶
Using character values that are indistinguishable from EOF
Required inputs: IR, StaticSemanticAnalysis
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
unsafe_eof |
‘EOF’ and ‘WEOF’ comparisons may be unsafe when sizeof(char) == sizeof(int). |
None |
False |
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
functions_under_test¶
functions_under_test : set[bauhaus.analysis.config.QualifiedName] = {'fgetc', 'fgetwc', 'getc', 'getchar', 'getwc', 'getwchar'}
EOF/WOEF might be
unsafe.
limit_header_files¶
limit_header_files : set[str] = {'limits.h'}
UCHAR_MAX,
UINT_MAX, WCHAR_MAX, WINT_MAX.