GitHub
CERT Secure Coding

Cppcheck Premium

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: 24.11.0

CheckerGuideline
arrayIndexOutOfBoundsARR30-C. Do not form or use out-of-bounds pointers or array subscripts
arrayIndexOutOfBoundsCondARR30-C. Do not form or use out-of-bounds pointers or array subscripts
arrayIndexThenCheckARR30-C. Do not form or use out-of-bounds pointers or array subscripts
autoVariablesDCL30-C. Declare objects with appropriate storage durations
autovarInvalidDeallocationMEM34-C. Only free memory allocated dynamically
bitwiseOnBooleanEXP46-C. Do not use a bitwise operator with a Boolean-like operand
comparePointersARR36-C. Do not subtract or compare two pointers that do not refer to the same array
danglingLifetimeDCL30-C. Declare objects with appropriate storage durations
deallocretMEM30-C. Do not access freed memory
deallocuseMEM30-C. Do not access freed memory
doubleFreeMEM30-C. Do not access freed memory
floatConversionOverflowFLP34-C. Ensure that floating-point conversions are within range of the new type
invalidLengthModifierErrorFIO47-C. Use valid format strings
invalidLifetimeDCL30-C. Declare objects with appropriate storage durations
invalidscanfFIO47-C. Use valid format strings
invalidScanfFormatWidthFIO47-C. Use valid format strings
IOWithoutPositioningFIO39-C. Do not alternately input and output from a stream without an intervening flush or positioning call
leakReturnValNotUsedMEM31-C. Free dynamically allocated memory when no longer needed
leakUnsafeArgAllocMEM31-C. Free dynamically allocated memory when no longer needed
memleakMEM31-C. Free dynamically allocated memory when no longer needed
memleakOnReallocMEM31-C. Free dynamically allocated memory when no longer needed
memsetValueOutOfRangeINT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
mismatchAllocDeallocMEM34-C. Only free memory allocated dynamically
missingReturnMSC37-C. Ensure that control never reaches the end of a non-void function
negativeArraySizeARR32-C. Ensure size arguments for variable length arrays are in a valid range
negativeIndexARR30-C. Do not form or use out-of-bounds pointers or array subscripts
nullPointerEXP34-C. Do not dereference null pointers
nullPointerDefaultArgEXP34-C. Do not dereference null pointers
nullPointerRedundantCheckEXP34-C. Do not dereference null pointers
outOfBoundsARR30-C. Do not form or use out-of-bounds pointers or array subscripts
possibleBufferAccessOutOfBoundsARR30-C. Do not form or use out-of-bounds pointers or array subscripts
premium-cert-arr30-cARR30-C. Do not form or use out-of-bounds pointers or array subscripts
premium-cert-arr32-cARR32-C. Ensure size arguments for variable length arrays are in a valid range
premium-cert-arr37-cARR37-C. Do not add or subtract an integer to a pointer to a non-array object
premium-cert-arr38-cARR38-C. Guarantee that library functions do not form invalid pointers
premium-cert-arr39-cARR39-C. Do not add or subtract a scaled integer to a pointer
premium-cert-con30-cCON30-C. Clean up thread-specific storage
premium-cert-con31-cCON31-C. Do not destroy a mutex while it is locked
premium-cert-con32-cCON32-C. Prevent data races when accessing bit-fields from multiple threads
premium-cert-con33-cCON33-C. Avoid race conditions when using library functions
premium-cert-con34-cCON34-C. Declare objects shared between threads with appropriate storage durations
premium-cert-con35-cCON35-C. Avoid deadlock by locking in a predefined order
premium-cert-con36-cCON36-C. Wrap functions that can spuriously wake up in a loop
premium-cert-con37-cCON37-C. Do not call signal() in a multithreaded program
premium-cert-con38-cCON38-C. Preserve thread safety and liveness when using condition variables
premium-cert-con39-cCON39-C. Do not join or detach a thread that was previously joined or detached
premium-cert-con40-cCON40-C. Do not refer to an atomic variable twice in an expression
premium-cert-con41-cCON41-C. Wrap functions that can fail spuriously in a loop
premium-cert-dcl31-cDCL31-C. Declare identifiers before using them
premium-cert-dcl36-cDCL36-C. Do not declare an identifier with conflicting linkage classifications
premium-cert-dcl37-cDCL37-C. Do not declare or define a reserved identifier
premium-cert-dcl38-cDCL38-C. Use the correct syntax when declaring a flexible array member
premium-cert-dcl39-cDCL39-C. Avoid information leakage when passing a structure across a trust boundary
premium-cert-dcl40-cDCL40-C. Do not create incompatible declarations of the same function or object
premium-cert-dcl41-cDCL41-C. Do not declare variables inside a switch statement before the first case label
premium-cert-env30-cENV30-C. Do not modify the object referenced by the return value of certain functions
premium-cert-env31-cENV31-C. Do not rely on an environment pointer following an operation that may invalidate it
premium-cert-env32-cENV32-C. All exit handlers must return normally
premium-cert-env33-cENV33-C. Do not call system()
premium-cert-env34-cENV34-C. Do not store pointers returned by certain functions
premium-cert-err30-cERR30-C. Take care when reading errno
premium-cert-err32-cERR32-C. Do not rely on indeterminate values of errno
premium-cert-err33-cERR33-C. Detect and handle standard library errors
premium-cert-exp32-cEXP32-C. Do not access a volatile object through a nonvolatile reference
premium-cert-exp35-cEXP35-C. Do not modify objects with temporary lifetime
premium-cert-exp36-cEXP36-C. Do not cast pointers into more strictly aligned pointer types
premium-cert-exp37-cEXP37-C. Call functions with the correct number and type of arguments
premium-cert-exp39-cEXP39-C. Do not access a variable through a pointer of an incompatible type
premium-cert-exp40-cEXP40-C. Do not modify constant objects
premium-cert-exp42-cEXP42-C. Do not compare padding data
premium-cert-exp43-cEXP43-C. Avoid undefined behavior when using restrict-qualified pointers
premium-cert-exp45-cEXP45-C. Do not perform assignments in selection statements
premium-cert-fio30-cFIO30-C. Exclude user input from format strings
premium-cert-fio32-cFIO32-C. Do not perform operations on devices that are only appropriate for files
premium-cert-fio34-cFIO34-C. Distinguish between characters read from a file and EOF or WEOF
premium-cert-fio38-cFIO38-C. Do not copy a FILE object
premium-cert-fio40-cFIO40-C. Reset strings on fgets() or fgetws() failure
premium-cert-fio41-cFIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects
premium-cert-fio44-cFIO44-C. Only use values for fsetpos() that are returned from fgetpos()
premium-cert-fio45-cFIO45-C. Avoid TOCTOU race conditions while accessing files
premium-cert-flp30-cFLP30-C. Do not use floating-point variables as loop counters
premium-cert-flp36-cFLP36-C. Preserve precision when converting integral values to floating-point type
premium-cert-flp37-cFLP37-C. Do not use object representations to compare floating-point values
premium-cert-int30-cINT30-C. Ensure that unsigned integer operations do not wrap
premium-cert-int31-cINT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
premium-cert-int32-cINT32-C. Ensure that operations on signed integers do not result in overflow
premium-cert-int33-cINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
premium-cert-int34-cINT34-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
premium-cert-int35-cINT35-C. Use correct integer precisions
premium-cert-int36-cINT36-C. Converting a pointer to integer or integer to pointer
premium-cert-mem33-cMEM33-C. Allocate and copy structures containing a flexible array member dynamically
premium-cert-mem35-cMEM35-C. Allocate sufficient memory for an object
premium-cert-mem36-cMEM36-C. Do not modify the alignment of objects by calling realloc()
premium-cert-msc30-cMSC30-C. Do not use the rand() function for generating pseudorandom numbers
premium-cert-msc32-cMSC32-C. Properly seed pseudorandom number generators
premium-cert-msc33-cMSC33-C. Do not pass invalid data to the asctime() function
premium-cert-msc38-cMSC38-C. Do not treat a predefined identifier as an object if it might only be implemented as a macro
premium-cert-msc39-cMSC39-C. Do not call va_arg() on a va_list that has an indeterminate value
premium-cert-msc40-cMSC40-C. Do not violate constraints
premium-cert-pre00-cPRE00-C. Prefer inline or static functions to function-like macros
premium-cert-pre01-cPRE01-C. Use parentheses within macros around parameter names
premium-cert-pre04-cPRE04-C. Do not reuse a standard header file name
premium-cert-pre09-cPRE09-C. Do not replace secure functions with deprecated or obsolescent functions
premium-cert-pre11-cPRE11-C. Do not conclude macro definitions with a semicolon
premium-cert-pre31-cPRE31-C. Avoid side effects in arguments to unsafe macros
premium-cert-sig30-cSIG30-C. Call only asynchronous-safe functions within signal handlers
premium-cert-sig31-cSIG31-C. Do not access shared objects in signal handlers
premium-cert-sig34-cSIG34-C. Do not call signal() from within interruptible signal handlers
premium-cert-sig35-cSIG35-C. Do not return from a computational exception signal handler
premium-cert-str30-cSTR30-C. Do not attempt to modify string literals
premium-cert-str32-cSTR32-C. Do not pass a non-null-terminated character sequence to a library function that expects a string
premium-cert-str34-cSTR34-C. Cast characters to unsigned char before converting to larger integer sizes
premium-cert-str38-cSTR38-C. Do not confuse narrow and wide character strings and functions
preprocessorErrorDirectivePRE30-C. Do not create a universal character name through concatenation
resourceLeakFIO42-C. Close files when they are no longer needed
returnDanglingLifetimeDCL30-C. Declare objects with appropriate storage durations
shiftNegativeINT34-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
shiftTooManyBitsINT34-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
suspiciousFloatingPointCastFLP34-C. Ensure that floating-point conversions are within range of the new type
uninitdataEXP33-C. Do not read uninitialized memory
uninitMemberVarEXP33-C. Do not read uninitialized memory
uninitstringEXP33-C. Do not read uninitialized memory
uninitStructMemberEXP33-C. Do not read uninitialized memory
uninitvarEXP33-C. Do not read uninitialized memory
unknownEvaluationOrderEXP30-C. Do not depend on the order of evaluation for side effects
wrongPrintfScanfArgNumFIO47-C. Use valid format strings
wrongPrintfScanfParameterPositionErrorFIO47-C. Use valid format strings
zerodivINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
zerodivcondINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors