GitHub
CERT Secure Coding

RuleChecker

This page was automatically generated and should not be edited.

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

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

Tool Version: 25.10

CheckerGuideline
(C++)EXP34-C. Do not dereference null pointers
(C++)EXP34-C. Do not dereference null pointers
(C++)EXP34-C. Do not dereference null pointers
(C++)EXP34-C. Do not dereference null pointers
(C++)INT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
(C++)MEM30-C. Do not access freed memory
(C++)MEM30-C. Do not access freed memory
(C++)MEM31-C. Free dynamically allocated memory when no longer needed
(C++)CON37-C. Do not call signal() in a multithreaded program
(C++)MSC30-C. Do not use the rand() function for generating pseudorandom numbers
(C++)MSC32-C. Properly seed pseudorandom number generators
alignas-extendedMSC40-C. Do not violate constraints
alignof-side-effectEXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
alloc-without-castMEM02-C. Immediately cast the result of a memory allocation function call into a pointer to the allocated type
alloc-without-sizeofEXP09-C. Use sizeof to determine the size of a type or variable
arithmetics-on-time-typeMSC05-C. Do not manipulate time_t typed values directly
array-index-range-constantARR30-C. Do not form or use out-of-bounds pointers or array subscripts
array-size-globalARR02-C. Explicitly specify array bounds, even if implicitly defined by an initializer
assignment-conditionalEXP45-C. Do not perform assignments in selection statements
assignment-to-non-modifiable-lvalueEXP40-C. Do not modify constant objects
assignment-to-non-modifiable-lvalueMSC40-C. Do not violate constraints
bad-enumeratorPOS47-C. Do not use threads that can be canceled asynchronously
bad-enumeratorPOS04-C. Avoid using PTHREAD_MUTEX_NORMAL type mutex locks
bad-functionCON37-C. Do not call signal() in a multithreaded program
bad-functionMSC30-C. Do not use the rand() function for generating pseudorandom numbers
bad-functionAPI04-C. Provide a consistent and usable error-checking mechanism
bad-functionERR06-C. Understand the termination behavior of assert() and abort()
bad-functionERR07-C. Prefer functions that support error checking over equivalent functions that don't
bad-functionWIN01-C. Do not forcibly terminate execution
bad-function-useSTR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
bad-function-useERR34-C. Detect errors when converting a string to a number
bad-function-useCON33-C. Avoid race conditions when using library functions
bad-function-useMSC33-C. Do not pass invalid data to the asctime() function
bad-function-useAPI04-C. Provide a consistent and usable error-checking mechanism
bad-macro-usePOS47-C. Do not use threads that can be canceled asynchronously
bad-macro-useERR06-C. Understand the termination behavior of assert() and abort()
bad-macro-usePOS04-C. Avoid using PTHREAD_MUTEX_NORMAL type mutex locks
bitfield-nameMSC09-C. Character encoding: Use subset of ASCII for safety
bitfield-typeINT12-C. Do not make assumptions about the type of a plain int bit-field when used in an expression
bitop-typeINT13-C. Use bitwise operators only on unsigned operands
bitop-typeINT16-C. Do not make assumptions about representation of signed integers
bitwise-operator-with-boolean-like-operandEXP46-C. Do not use a bitwise operator with a Boolean-like operand
cast-pointer-void-arithmetic-implicitMSC40-C. Do not violate constraints
chained-comparisonEXP13-C. Treat relational and equality operators as if they were nonassociative
chained-errno-function-callsERR30-C. Take care when reading errno
char-sign-conversionSTR34-C. Cast characters to unsigned char before converting to larger integer sizes
character-constantenum-tag-spellingMSC09-C. Character encoding: Use subset of ASCII for safety
cnd-mtx-relationPOS53-C. Do not use more than one mutex for concurrent waiting operations on a condition variable
compound-ifelseEXP19-C. Use braces for the body of an if, for, or while statement
compound-loopEXP19-C. Use braces for the body of an if, for, or while statement
constant-call-argumentMSC32-C. Properly seed pseudorandom number generators
constant-expression-wrap-aroundINT30-C. Ensure that unsigned integer operations do not wrap
csa-call-null-function-pointerEXP34-C. Do not dereference null pointers
csa-call-null-object-pointerEXP34-C. Do not dereference null pointers
csa-division-by-zeroINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
csa-double-freeMEM30-C. Do not access freed memory
csa-memory-leakMEM31-C. Free dynamically allocated memory when no longer needed
csa-null-dereferenceEXP34-C. Do not dereference null pointers
csa-null-reference-paramEXP34-C. Do not dereference null pointers
csa-stack-address-escape (C++)ARR30-C. Do not form or use out-of-bounds pointers or array subscripts
csa-use-after-freeMEM30-C. Do not access freed memory
ctype-limitsSTR37-C. Arguments to character-handling functions must be representable as an unsigned char
dead-assignemntMSC07-C. Detect and remove dead code
dead-assignmentMSC12-C. Detect and remove code that has no effect or is never executed
dead-assignmentMSC13-C. Detect and remove unused values
dead-initializerMSC07-C. Detect and remove dead code
dead-initializerMSC12-C. Detect and remove code that has no effect or is never executed
dead-initializerMSC13-C. Detect and remove unused values
default-constructionMSC32-C. Properly seed pseudorandom number generators
distinct-externDCL40-C. Do not create incompatible declarations of the same function or object
element-type-incompleteMSC40-C. Do not violate constraints
empty-bodyEXP15-C. Do not place a semicolon on the same line as an if, for, or while statement
empty-parameter-listDCL20-C. Explicitly specify void when a function accepts no arguments
encoding-mismatchSTR10-C. Do not concatenate different type of string literals
enum-implicit-valueINT09-C. Ensure enumeration constants map to unique values
enumeration-constant-nameMSC09-C. Character encoding: Use subset of ASCII for safety
eof-small-int-comparisonINT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
eof-small-int-comparisonFIO34-C. Distinguish between characters read from a file and EOF or WEOF
errno-test-after-wrong-callERR30-C. Take care when reading errno
error-information-unusedERR33-C. Detect and handle standard library errors
error-information-unusedPOS54-C. Detect and handle POSIX library errors
error-information-unusedAPI04-C. Provide a consistent and usable error-checking mechanism
error-information-unusedEXP12-C. Do not ignore values returned by functions
evaluation-orderEXP30-C. Do not depend on the order of evaluation for side effects
evaluation-orderEXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place
exit-handler-bad-functionENV32-C. All exit handlers must return normally
expanded-side-effect-multipliedPRE31-C. Avoid side effects in arguments to unsafe macros
expanded-side-effect-not-evaluatedPRE31-C. Avoid side effects in arguments to unsafe macros
explicit-cast-overflowINT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
expression-result-unusedMSC12-C. Detect and remove code that has no effect or is never executed
file-dereferenceFIO38-C. Do not copy a FILE object
flexible-array-member-assignmentMEM33-C. Allocate and copy structures containing a flexible array member dynamically
flexible-array-member-declarationMEM33-C. Allocate and copy structures containing a flexible array member dynamically
float-comparisonFLP02-C. Avoid using floating-point numbers when precise computation is needed
fopen-modeFIO11-C. Take care when specifying the mode parameter of fopen()
fopen-s-modeFIO11-C. Take care when specifying the mode parameter of fopen()
for-loop-floatFLP30-C. Do not use floating-point variables as loop counters
format-string-excessive-argumentsFIO47-C. Use valid format strings
format-string-mismatched-argumentsFIO47-C. Use valid format strings
function-argument-with-paddingDCL39-C. Avoid information leakage when passing a structure across a trust boundary
function-like-macro-expansionPRE00-C. Prefer inline or static functions to function-like macros
function-like-macro-nameMSC09-C. Character encoding: Use subset of ASCII for safety
function-name-constant-comparisonEXP16-C. Do not compare function pointers to constant values
function-pointer-integer-castINT36-C. Converting a pointer to integer or integer to pointer
function-pointer-integer-cast-implicitINT36-C. Converting a pointer to integer or integer to pointer
function-pointer-integer-cast-implicitMSC40-C. Do not violate constraints
function-prototypeDCL07-C. Include the appropriate type information in function declarators
function-return-typeDCL31-C. Declare identifiers before using them
function-return-typeMSC40-C. Do not violate constraints
future-library-useDCL37-C. Do not declare or define a reserved identifier
generic-selection-side-effectEXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
global-function-nameMSC09-C. Character encoding: Use subset of ASCII for safety
global-object-nameMSC09-C. Character encoding: Use subset of ASCII for safety
global-object-name-constMSC09-C. Character encoding: Use subset of ASCII for safety
global-object-scopeDCL15-C. Declare file-scope objects or functions that do not need external linkage as static
global-object-scopeDCL19-C. Minimize the scope of variables and functions
header-filenameMSC09-C. Character encoding: Use subset of ASCII for safety
iMEM30-C. Do not access freed memory
identifier-hiddenDCL01-C. Do not reuse variable names in subscopes
implementation-filenameMSC09-C. Character encoding: Use subset of ASCII for safety
implicit-function-declarationDCL31-C. Declare identifiers before using them
implicit-function-declarationDCL07-C. Include the appropriate type information in function declarators
imprecise-int-to-float-castFLP34-C. Ensure that floating-point conversions are within range of the new type
imprecise-int-to-float-castFLP36-C. Preserve precision when converting integral values to floating-point type
imprecise-int-to-float-conversionFLP34-C. Ensure that floating-point conversions are within range of the new type
imprecise-int-to-float-conversionFLP36-C. Preserve precision when converting integral values to floating-point type
inappropriate-pointer-castEXP39-C. Do not access a variable through a pointer of an incompatible type
inappropriate-pointer-cast-implicitEXP39-C. Do not access a variable through a pointer of an incompatible type
inappropriate-pointer-cast-implicitMSC40-C. Do not violate constraints
include-guard-missingPRE06-C. Enclose header files in an include guard
include-guard-pragma-oncePRE06-C. Enclose header files in an include guard
incompatible-function-pointer-conversionMSC40-C. Do not violate constraints
incompatible-object-pointer-conversionMSC40-C. Do not violate constraints
initializer-excessMSC40-C. Do not violate constraints
initializer-excessSTR11-C. Do not specify the bound of a character array initialized with a string literal
int-division-by-zeroINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
int-modulo-by-zeroINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
internal-and-external-linkageDCL36-C. Do not declare an identifier with conflicting linkage classifications
internal-and-external-linkageMSC15-C. Do not depend on undefined behavior
invalid-array-sizeMSC40-C. Do not violate constraints
invalid-format-stringFIO47-C. Use valid format strings
invalid-freeMEM34-C. Only free memory allocated dynamically
invalid-thread-operationCON39-C. Do not join or detach a thread that was previously joined or detached
invalidated-system-pointer-useENV31-C. Do not rely on an environment pointer following an operation that may invalidate it
language-overrideDCL37-C. Do not declare or define a reserved identifier
language-undefineDCL37-C. Do not declare or define a reserved identifier
literal-assignmentSTR05-C. Use pointers to const when referring to string literals
local-object-nameMSC09-C. Character encoding: Use subset of ASCII for safety
local-object-name-constMSC09-C. Character encoding: Use subset of ASCII for safety
local-object-scopeDCL19-C. Minimize the scope of variables and functions
local-static-object-nameMSC09-C. Character encoding: Use subset of ASCII for safety
local-static-object-name-constMSC09-C. Character encoding: Use subset of ASCII for safety
logop-side-effectEXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators
long-suffixDCL16-C. Use "L," not "l," to indicate a long value
macro-argument-hashPRE32-C. Do not use preprocessor directives in invocations of function-like macros
macro-final-semicolonPRE11-C. Do not conclude macro definitions with a semicolon
macro-function-likePRE00-C. Prefer inline or static functions to function-like macros
macro-function-like-strictPRE00-C. Prefer inline or static functions to function-like macros
macro-parameter-multipliedPRE12-C. Do not define unsafe macros
macro-parameter-parenthesesPRE01-C. Use parentheses within macros around parameter names
macro-parameter-unusedPRE12-C. Do not define unsafe macros
malloc-size-insufficientMEM35-C. Allocate sufficient memory for an object
memcmp-with-floatFLP37-C. Do not use object representations to compare floating-point values
memcpy-with-paddingEXP42-C. Do not compare padding data
missing-elseMSC01-C. Strive for logical completeness
mmline-commentMSC04-C. Use comments consistently and in a readable fashion
multi-declarationDCL04-C. Do not declare more than one variable per declaration
multiple-atomic-accessesCON40-C. Do not refer to an atomic variable twice in an expression
multiple-volatile-accessesEXP30-C. Do not depend on the order of evaluation for side effects
multiple-volatile-accessesEXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place
non-boolean-conditionEXP20-C. Perform explicit tests to determine success, true and false, and equality
non-constant-static-assertMSC40-C. Do not violate constraints
nvalid-freeMEM30-C. Do not access freed memory
object-like-macro-nameMSC09-C. Character encoding: Use subset of ASCII for safety
object-pointer-diff-castEXP39-C. Do not access a variable through a pointer of an incompatible type
object-pointer-diff-cast-implicitEXP39-C. Do not access a variable through a pointer of an incompatible type
octal-constantDCL18-C. Do not begin integer constants with 0 when specifying a decimal value
parameter-matchEXP37-C. Call functions with the correct number and type of arguments
parameter-match-typeEXP37-C. Call functions with the correct number and type of arguments
parameter-match-typeMSC40-C. Do not violate constraints
parameter-missing-constDCL00-C. Const-qualify immutable objects
parameter-missing-constDCL13-C. Declare function parameters that are pointers to values not changed by the function as const
pointer-cast-alignmentEXP36-C. Do not cast pointers into more strictly aligned pointer types
pointer-comparisonARR36-C. Do not subtract or compare two pointers that do not refer to the same array
pointer-comparisonMSC15-C. Do not depend on undefined behavior
pointer-integral-castINT36-C. Converting a pointer to integer or integer to pointer
pointer-integral-cast-implicitINT36-C. Converting a pointer to integer or integer to pointer
pointer-integral-cast-implicitMSC40-C. Do not violate constraints
pointer-qualifier-cast-constEXP40-C. Do not modify constant objects
pointer-qualifier-cast-constEXP05-C. Do not cast away a const qualification
pointer-qualifier-cast-const-implicitEXP40-C. Do not modify constant objects
pointer-qualifier-cast-const-implicitMSC40-C. Do not violate constraints
pointer-qualifier-cast-const-implicitEXP05-C. Do not cast away a const qualification
pointer-qualifier-cast-volatileEXP32-C. Do not access a volatile object through a nonvolatile reference
pointer-qualifier-cast-volatile-implicitEXP32-C. Do not access a volatile object through a nonvolatile reference
pointer-qualifier-cast-volatile-implicitMSC40-C. Do not violate constraints
pointer-subtractionARR36-C. Do not subtract or compare two pointers that do not refer to the same array
pointer-subtractionMSC15-C. Do not depend on undefined behavior
pointer-typedefDCL05-C. Use typedefs of non-pointer types only
precision-shift-widthINT35-C. Use correct integer precisions
precision-shift-width-constantINT34-C. Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand
precision-shift-width-constantINT35-C. Use correct integer precisions
putenv-arg-localPOS34-C. Do not call putenv() with a pointer to an automatic variable as the argument
redeclarationMSC40-C. Do not violate constraints
redundant-operationMSC12-C. Detect and remove code that has no effect or is never executed
reserved-declarationDCL37-C. Do not declare or define a reserved identifier
reserved-identifierDCL37-C. Do not declare or define a reserved identifier
restrictEXP43-C. Avoid undefined behavior when using restrict-qualified pointers
return-emptyMSC40-C. Do not violate constraints
return-implicitMSC37-C. Ensure that control never reaches the end of a non-void function
return-implicitMSC15-C. Do not depend on undefined behavior
return-non-emptyMSC40-C. Do not violate constraints
return-reference-localDCL30-C. Declare objects with appropriate storage durations
return-reference-localARR30-C. Do not form or use out-of-bounds pointers or array subscripts
scaled-pointer-arithmeticARR39-C. Do not add or subtract a scaled integer to a pointer
scanf-string-to-numberERR34-C. Detect errors when converting a string to a number
side-effect-not-expandedPRE31-C. Avoid side effects in arguments to unsafe macros
signal-handler-shared-accessSIG31-C. Do not access shared objects in signal handlers
signal-handler-signal-callSIG34-C. Do not call signal() from within interruptible signal handlers
signal-handler-unsafe-callSIG30-C. Call only asynchronous-safe functions within signal handlers
sizeofEXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
sizeof-array-parameterARR01-C. Do not apply the sizeof operator to a pointer when taking the size of an array
sline-commentMSC04-C. Use comments consistently and in a readable fashion
sline-splicingMSC04-C. Use comments consistently and in a readable fashion
smline-commentMSC04-C. Use comments consistently and in a readable fashion
statement-sideeffectMSC12-C. Detect and remove code that has no effect or is never executed
static-assertMSC40-C. Do not violate constraints
static-function-declarationDCL36-C. Do not declare an identifier with conflicting linkage classifications
static-function-nameMSC09-C. Character encoding: Use subset of ASCII for safety
static-object-declarationDCL36-C. Do not declare an identifier with conflicting linkage classifications
static-object-nameMSC09-C. Character encoding: Use subset of ASCII for safety
static-object-name-constMSC09-C. Character encoding: Use subset of ASCII for safety
stdlib-array-sizeARR38-C. Guarantee that library functions do not form invalid pointers
stdlib-const-pointer-assignENV30-C. Do not modify the object referenced by the return value of certain functions
stdlib-limitsFLP32-C. Prevent or detect domain and range errors in math functions
stdlib-macro-atoMSC24-C. Do not use deprecated or obsolescent functions
stdlib-macro-atollMSC24-C. Do not use deprecated or obsolescent functions
stdlib-string-sizeARR38-C. Guarantee that library functions do not form invalid pointers
stdlib-string-sizeSTR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
stdlib-string-terminationSTR32-C. Do not pass a non-null-terminated character sequence to a library function that expects a string
stdlib-use-atoMSC24-C. Do not use deprecated or obsolescent functions
stdlib-use-atollMSC24-C. Do not use deprecated or obsolescent functions
stdlib-use-randMSC30-C. Do not use the rand() function for generating pseudorandom numbers
stdlib-use-signalCON37-C. Do not call signal() in a multithreaded program
stdlib-use-systemENV33-C. Do not call system()
strcpy-limitsARR38-C. Guarantee that library functions do not form invalid pointers
strcpy-limitsSTR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
stream-argument-with-side-effectsFIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects
string-initializer-nullSTR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
string-initializer-nullSTR11-C. Do not specify the bound of a character array initialized with a string literal
string-literalMSC09-C. Character encoding: Use subset of ASCII for safety
string-literal-modficationSTR30-C. Do not attempt to modify string literals
struct-member-nameMSC09-C. Character encoding: Use subset of ASCII for safety
struct-tag-spellingMSC09-C. Character encoding: Use subset of ASCII for safety
SupportedMSC41-C. Never hard code sensitive information
Supported indirectly via MISRA C:2004 rule 6.1.STR04-C. Use plain char for characters in the basic character set
Supported indirectly via MISRA C:2004 rule 6.1 and MISRA C:2012 rule 10.1.STR00-C. Represent characters using an appropriate type
Supported indirectly via MISRA C:2004 Rule 17.4.ARR37-C. Do not add or subtract an integer to a pointer to a non-array object
Supported indirectly via MISRA C:2012 rule 10.1.STR09-C. Don't assume numeric values for expressions with type plain character
Supported indirectly via MISRA C:2012 Rules 5.1, 5.2, 5.3, 5.4 and 5.5.DCL23-C. Guarantee that mutually visible identifiers are unique
Supported indirectly via MISRA C:2012 rules 10.1, 10.3 and 10.4.INT07-C. Use only explicitly signed or unsigned char type for numeric values
Supported, but no explicit checkerMSC38-C. Do not treat a predefined identifier as an object if it might only be implemented as a macro
switch-clause-breakMSC17-C. Finish every set of statements associated with a case label with a break statement
switch-clause-break-continueMSC17-C. Finish every set of statements associated with a case label with a break statement
switch-clause-break-returnMSC17-C. Finish every set of statements associated with a case label with a break statement
switch-defaultMSC01-C. Strive for logical completeness
switch-labelMSC20-C. Do not use a switch statement to transfer control into a complex block
switch-skipped-codeDCL41-C. Do not declare variables inside a switch statement before the first case label
temporary-object-modificationEXP35-C. Do not modify objects with temporary lifetime
temporary-object-modificationMSC15-C. Do not depend on undefined behavior
thread-resource-storage-durationCON34-C. Declare objects shared between threads with appropriate storage durations
trigraphPRE07-C. Avoid using repeated question marks
type-compatibilityDCL40-C. Do not create incompatible declarations of the same function or object
type-compatibilityMSC40-C. Do not violate constraints
type-compatibility-linkDCL40-C. Do not create incompatible declarations of the same function or object
type-compatibility-linkMSC40-C. Do not violate constraints
type-specifierDCL31-C. Declare identifiers before using them
type-specifierMSC40-C. Do not violate constraints
typedef-nameMSC09-C. Character encoding: Use subset of ASCII for safety
undeclared-parameterDCL31-C. Declare identifiers before using them
undeclared-parameterMSC40-C. Do not violate constraints
uninitialized-local-readEXP33-C. Do not read uninitialized memory
union-member-nameMSC09-C. Character encoding: Use subset of ASCII for safety
union-tag-spellingMSC09-C. Character encoding: Use subset of ASCII for safety
universal-character-name-concatenationPRE30-C. Do not create a universal character name through concatenation
unnamed-parameterMSC40-C. Do not violate constraints
unreachable-code-after-jumpMSC12-C. Detect and remove code that has no effect or is never executed
unused-functionMSC12-C. Detect and remove code that has no effect or is never executed
unused-local-variableMSC13-C. Detect and remove unused values
unused-parameterMSC13-C. Detect and remove unused values
variable-array-lengthARR32-C. Ensure size arguments for variable length arrays are in a valid range
wide-narrow-string-castSTR38-C. Do not confuse narrow and wide character strings and functions
wide-narrow-string-cast-implicitSTR38-C. Do not confuse narrow and wide character strings and functions