Title: STR34-C. Cast characters to unsigned char before converting to larger integer sizes  
Author: Robert Seacord Sep 26, 2007
Last Changed by: Jill Britton Apr 20, 2023
Tiny Link: (useful for email) https://wiki.sei.cmu.edu/confluence/x/BdYxBQ
Export As: Word · PDF  
Hierarchy
Parent Page
    Page: Rule 07. Characters and Strings (STR)
Outgoing Links
External Links (12)
    cwe.mitre.org/data/definitions/704.html
    gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX139
    https://www.mathworks.com/help/bugfinder/ref/certcrulestr34…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-0887
    www.cert.org/advisories/CA-1996-22.html
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    xorl.wordpress.com/2009/03/26/cve-2009-0887-linux-pam-singe…
    https://www.kb.cert.org/vulnotes/bymetric?searchview&query=…
    https://wiki.sei.cmu.edu/confluence/display/c/Polyspace+Bug…
    cwe.mitre.org/
SEI CERT C Coding Standard (34)     Page: Axivion Bauhaus Suite
    Page: INT07-C. Use only explicitly signed or unsigned char type for numeric values
    Page: Coverity
    Page: PC-lint Plus
    Page: TrustInSoft Analyzer
    Page: Polyspace Bug Finder_V
    Home page: SEI CERT C Coding Standard
    Page: Astrée_V
    Page: PC-lint Plus_V
    Page: CodeSonar_V
    Page: LDRA
    Page: TrustInSoft Analyzer_V
    Page: AA. Bibliography
    Page: Coverity_V
    Page: Parasoft
    Page: STR04-C. Use plain char for characters in the basic character set
    Page: Rose
    Page: Klocwork
    Page: LDRA_V
    Page: ECLAIR
    Page: CodeSonar
    Page: RuleChecker_V
    Page: Axivion Bauhaus Suite_V
    Page: STR37-C. Arguments to character-handling functions must be representable as an unsigned char
    Page: Astrée
    Page: Helix QAC
    Page: ARR30-C. Do not form or use out-of-bounds pointers or array subscripts
    Page: GCC
    Page: RuleChecker
    Page: Helix QAC_V
    Page: BB. Definitions
    Page: ECLAIR_V
    Page: Klocwork_V
    Page: Parasoft_V