Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM Cost Reform

...

Passing values to character handling functions that cannot be represented as an unsigned char to character handling functions is undefined behavior 112.

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

STR37-C

Low

Unlikely

Yes

YesLow

P3

L3

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
ctype-limitsPartially checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-STR37Fully implemented
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V
MISC.NEGCHARNegative character value
Compass/ROSE

Could detect violations of this rule by seeing if the argument to a character handling function (listed above) is not an unsigned char

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CC2.STR37

Fully implemented

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C4413, C4414

C++3051


Klocwork
Include Page
Klocwork_V
Klocwork_V
AUTOSAR.STDLIB.CCTYPE.UCHAR
MISRA.ETYPE.ASSIGN.2012


LDRA tool suite
Include Page
LDRA_V
LDRA_V
663 SFully implemented
Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_C-STR37-aDo not pass incorrect values to ctype.h library functions
Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rule STR37-C

Checks for invalid use of standard library integer routine (rule fully covered)

RuleChecker

Include Page
RuleChecker_V
RuleChecker_V

ctype-limitsPartially checked
TrustInSoft Analyzer

Include Page
TrustInSoft Analyzer_V
TrustInSoft Analyzer_V

valid_charPartially verified.

...