Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Generated Content
Info
title
Note

This page is automaticallygenerated from the "Automated Detection" sections in the individual guidelines. Do not modify this page directly.

Version number:
v5.0 

was automatically generated and should not be edited.

Note

The information on this page was provided by outside contributors and has not been verified by SEI CERT.

Tip

The table below can be re-ordered, by clicking column headers.

...

Include Page
Rose_V
Rose_V

Checker

Guideline

MEM50-CPP. Do not access freed memory
MEM52-CPP. Detect and handle memory allocation errors
MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers
Can detect simple violations of this rule. It needs to examine each expression and make sure that no variable is modified twice in the expression. It also must check that no variable is modified once, then read elsewhere, with the single exception that a variable may appear on both the left and right of an assignment operator EXP50-CPP. Do not depend on the order of evaluation for side effects

C++ checkers

Rule

 

ARR01-CPP. Do not apply the sizeof operator to a pointer when taking the size of an array

 

ARR02-CPP. Explicitly specify array bounds, even if implicitly defined by an initializer

 

ARR30-CPP. Guarantee that array and vector indices are within the valid range

 

DCL01-CPP. Do not reuse variable names in subscopes

 

DCL02-CPP. Use visually distinct identifiers

 

DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic

 

EXP12-CPP. Do not ignore values returned by functions or methods

 

EXP35-CPP. Do not cast away a const qualification

 

EXP36-CPP. Do not convert pointers into more strictly aligned pointer types

 

FIO07-CPP. Prefer fseek() to rewind()

 

FIO12-CPP. Prefer setvbuf() to setbuf()

 

INT07-CPP. Use only explicitly signed or unsigned char type for numeric values

 

INT09-CPP. Ensure enumeration constants map to unique values

 

INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression

 

MSC18-CPP. Finish every set of statements associated with a case label with a break statement

 

MSC30-CPP. Do not use the rand() function for generating pseudorandom numbers

 

STR34-CPP. Cast characters to unsigned types before converting to larger integer sizes

 

STR36-CPP. Do not specify the bound of a character array initialized with a string literal