Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tool

Version

Checker

Description

CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

LANG.TYPE.AWID
LANG.TYPE.OWID

LANG.CAST.VALUE
LANG.CAST.COERCE

ALLOC.SIZE.ADDOFLOW
ALLOC.SIZE.IOFLOW
ALLOC.SIZE.MULOFLOW
ALLOC.SIZE.SUBUFLOW
ALLOC.SIZE.TRUNC
MISC.MEM.SIZE.ADDOFLOW
MISC.MEM.SIZE.BAD
MISC.MEM.SIZE.MULOFLOW
MISC.MEM.SIZE.SUBUFLOW
MISC.MEM.SIZE.TRUNC

Expression value widened by assignment
Expression value widened by other operand

Cast alters value
Coercion alters value

Addition overflow of allocation size
Integer overflow of allocation size
Multiplication overflow of allocation size
Subtraction underflow of allocation size
Truncation of allocation size
Addition overflow of size
Unreasonable size argument
Multiplication overflow of size
Subtraction underflow of size
Truncation of size

Compass/ROSE

 

 

Can detect violations of this rule. It should look for patterns of (a op1 b) op2 c where

    • c has a bigger type than a or b
    • Neither a nor b is typecast to c's type
    • op2 is assignment or comparison
Coverity6.5OVERFLOW_BEFORE_WIDENFully implemented
Fortify SCA

5.0

 

Can detect violations of this rule with CERT C Rule Pack

LDRA tool suite
Include Page
LDRA_V
LDRA_V
452 SPartially implemented
Parasoft C/C++test9.5MISRA-043{b} 
Polyspace Bug FinderR2016a

Integer conversion overflow

Integer overflow

Unsigned integer conversion overflow

Unsigned integer overflow

Overflow when converting between integer types

Overflow from operation between integers

Overflow when converting between unsigned integer types

Overflow from operation between unsigned integers

PRQA QA-C
Include Page
PRQA QA-C_v
PRQA QA-C_v

1890, 1891, 1892,
1893,1894, 1895,
4490,
4491, 4492

Partially implemented

...