CERT C rules and recommendations mapped to Klocwork and Klocwork community checkers
The following tables map CERT C rules and CERT C recommendations to both Klocwork and Klocwork community C checkers.
CERT C rules
Rule | Checker name and description |
---|---|
ARR30-C |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds ABV.STACK Buffer Overflow - Local Array Index Out of Bounds ABV.TAINTED Buffer Overflow from Unvalidated Input ABV.UNICODE.BOUND_MAP Buffer overflow in mapping character function ABV.UNICODE.FAILED_MAP Mapping function failed ABV.UNICODE.NNTS_MAP Buffer overflow in mapping character function ABV.UNICODE.SELF_MAP Mapping function failed ABV.UNKNOWN_SIZE Buffer Overflow - Array Index Out of Bounds NNTS.MIGHT Buffer Overflow - Non-null Terminated String NNTS.MUST Buffer Overflow - Non-null Terminated String NNTS.TAINTED Unvalidated User Input Causing Buffer Overflow - Non-Null Terminated String NPD.FUNC.CALL.MIGHT Result of function that may return NULL may be passed to another function that may dereference it SV.TAINTED.INDEX_ACCESS Use of Unvalidated Integer as Array Index SV.TAINTED.LOOP_BOUND Use of Unvalidated Integer in Loop Condition |
ARR30-C(L2) |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds ABV.STACK Buffer Overflow - Local Array Index Out of Bounds ABV.TAINTED Buffer Overflow from Unvalidated Input ABV.UNICODE.BOUND_MAP Buffer overflow in mapping character function ABV.UNICODE.FAILED_MAP Mapping function failed ABV.UNICODE.NNTS_MAP Buffer overflow in mapping character function ABV.UNICODE.SELF_MAP Mapping function failed ABV.UNKNOWN_SIZE Buffer Overflow - Array Index Out of Bounds NNTS.MIGHT Buffer Overflow - Non-null Terminated String NNTS.MUST Buffer Overflow - Non-null Terminated String NNTS.TAINTED Unvalidated User Input Causing Buffer Overflow - Non-Null Terminated String NPD.FUNC.CALL.MIGHT Result of function that may return NULL may be passed to another function that may dereference it SV.TAINTED.INDEX_ACCESS Use of Unvalidated Integer as Array Index SV.TAINTED.LOOP_BOUND Use of Unvalidated Integer in Loop Condition |
ARR32-C |
MISRA.ARRAY.VAR_LENGTH.2012 Variable-length array types shall not be used |
ARR32-C(L2) |
MISRA.ARRAY.VAR_LENGTH.2012 Variable-length array types shall not be used |
ARR36-C |
MISRA.PTR.ARITH Pointer is used in arithmetic or array index expression |
ARR36-C(L2) |
MISRA.PTR.ARITH Pointer is used in arithmetic or array index expression |
ARR37-C |
CERT.ARR.PTR.ARITH Pointer is used in arithmetic expression |
ARR37-C(L2) |
CERT.ARR.PTR.ARITH Pointer is used in arithmetic expression |
ARR38-C |
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds |
ARR38-C(L1) |
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds |
ARR39-C |
CERT.ARR.PTR.ARITH Pointer is used in arithmetic expression |
ARR39-C(L2) |
CERT.ARR.PTR.ARITH Pointer is used in arithmetic expression |
CON33-C |
CERT.CONC.LIB_FUNC_USE Avoid race conditions when using library functions |
CON33-C(L3) |
CERT.CONC.LIB_FUNC_USE Avoid race conditions when using library functions |
CON35-C |
CONC.DL Deadlock CONC.NO_UNLOCK Missing unlock for variable |
CON35-C(L3) |
CONC.DL Deadlock CONC.NO_UNLOCK Missing unlock for variable |
CON36-C |
CERT.CONC.WAKE_IN_LOOP_C Wrap functions that can spuriously wake up in a loop |
CON36-C(L3) |
CERT.CONC.WAKE_IN_LOOP_C Wrap functions that can spuriously wake up in a loop |
CON37-C |
MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h |
CON37-C(L2) |
MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h |
CON38-C |
CERT.CONC.UNSAFE_COND_VAR_C Preserve thread safety and liveness when using condition variables |
CON38-C(L3) |
CERT.CONC.UNSAFE_COND_VAR_C Preserve thread safety and liveness when using condition variables |
CON40-C |
CERT.CONC.ATOMIC_TWICE_EXPR Do not refer to an atomic variable twice in an expression |
CON40-C(L2) |
CERT.CONC.ATOMIC_TWICE_EXPR Do not refer to an atomic variable twice in an expression |
CON41-C |
CERT.CONC.ATOMIC_COMP_FAIL_IN_LOOP Wrap functions that can spuriously fail up in a loop |
CON41-C(L3) |
CERT.CONC.ATOMIC_COMP_FAIL_IN_LOOP Wrap functions that can spuriously fail up in a loop |
DCL30-C |
LOCRET.ARG Function returns address of local variable LOCRET.GLOB Function returns address of local variable LOCRET.RET Function returns address of local variable |
DCL30-C(L2) |
LOCRET.ARG Function returns address of local variable LOCRET.GLOB Function returns address of local variable LOCRET.RET Function returns address of local variable |
DCL31-C |
CWARN.IMPLICITINT Anachronistic 'implicit int' MISRA.DECL.NO_TYPE Declaration without a type MISRA.FUNC.NOPROT.CALL Function is called but has no prototype RETVOID.IMPLICIT Implicitly int function returns void value |
DCL31-C(L3) |
CWARN.IMPLICITINT Anachronistic 'implicit int' MISRA.DECL.NO_TYPE Declaration without a type MISRA.FUNC.NOPROT.CALL Function is called but has no prototype RETVOID.IMPLICIT Implicitly int function returns void value |
DCL36-C |
MISRA.FUNC.STATIC.REDECL Function or object redeclaration does not include 'static' modifier |
DCL36-C(L2) |
MISRA.FUNC.STATIC.REDECL Function or object redeclaration does not include 'static' modifier |
DCL37-C |
MISRA.DEFINE.WRONGNAME.UNDERSCORE Usage of a reserved name for naming a macro MISRA.STDLIB.WRONGNAME Reused name of standard library macro, object or function MISRA.STDLIB.WRONGNAME.UNDERSCORE Usage of a reserved name for naming a language entity |
DCL37-C(L3) |
MISRA.DEFINE.WRONGNAME.UNDERSCORE Usage of a reserved name for naming a macro MISRA.STDLIB.WRONGNAME Reused name of standard library macro, object or function MISRA.STDLIB.WRONGNAME.UNDERSCORE Usage of a reserved name for naming a language entity |
DCL38-C |
CERT.STRUCT.FLEXIBLE_ARRAY_MEMBER Use the correct syntax when declaring a flexible array member |
DCL38-C(L3) |
CERT.STRUCT.FLEXIBLE_ARRAY_MEMBER Use the correct syntax when declaring a flexible array member |
DCL39-C |
PORTING.STORAGE.STRUCT Byte position of elements in a structure could depend on alignment and packing attributes. |
DCL39-C(L3) |
PORTING.STORAGE.STRUCT Byte position of elements in a structure could depend on alignment and packing attributes. |
DCL40-C |
MISRA.FUNC.NOPROT.DEF.2012 Function has a definition but no prototype MISRA.FUNC.PARAMS.IDENT Identifiers used in declaration and definition of function are not identical |
DCL40-C(L3) |
MISRA.FUNC.NOPROT.DEF.2012 Function has a definition but no prototype MISRA.FUNC.PARAMS.IDENT Identifiers used in declaration and definition of function are not identical |
DCL41-C |
CERT.DCL.SWITCH.VAR_BEFORE_CASE Do not declare variables inside a switch statement before the first case label |
DCL41-C(L3) |
CERT.DCL.SWITCH.VAR_BEFORE_CASE Do not declare variables inside a switch statement before the first case label |
ENV30-C |
MISRA.STDLIB.CTYPE.RANGE.2012_AMD1 Any value passed to a function in ctype.h shall be representable as an unsigned char or be the value EOF MISRA.STDLIB.ILLEGAL_REUSE.2012_AMD1 The pointer returned by the Standard Library functions asctime and similar shall not be used following a subsequent call to the same function MISRA.STDLIB.ILLEGAL_WRITE.2012_AMD1 The pointers returned by the Standard Library functions localeconv, getenv, setlocale or, strerror shall only be used as if they have pointer to const-qualified type |
ENV30-C(L3) |
MISRA.STDLIB.CTYPE.RANGE.2012_AMD1 Any value passed to a function in ctype.h shall be representable as an unsigned char or be the value EOF MISRA.STDLIB.ILLEGAL_REUSE.2012_AMD1 The pointer returned by the Standard Library functions asctime and similar shall not be used following a subsequent call to the same function MISRA.STDLIB.ILLEGAL_WRITE.2012_AMD1 The pointers returned by the Standard Library functions localeconv, getenv, setlocale or, strerror shall only be used as if they have pointer to const-qualified type |
ENV32-C |
CERT.EXIT.HANDLER_TERMINATE All exit handlers must return normally |
ENV32-C(L1) |
CERT.EXIT.HANDLER_TERMINATE All exit handlers must return normally |
ENV33-C |
SV.CODE_INJECTION.SHELL_EXEC Command Injection into Shell Execution |
ENV33-C(L1) |
SV.CODE_INJECTION.SHELL_EXEC Command Injection into Shell Execution |
ENV34-C |
MISRA.STDLIB.ILLEGAL_REUSE.2012_AMD1 The pointer returned by the Standard Library functions asctime and similar shall not be used following a subsequent call to the same function |
ENV34-C(L3) |
MISRA.STDLIB.ILLEGAL_REUSE.2012_AMD1 The pointer returned by the Standard Library functions asctime and similar shall not be used following a subsequent call to the same function |
ERR30-C |
CXX.ERRNO.INCORRECTLY_CHECKED Errno condition check not required after calling library function CXX.ERRNO.NOT_CHECKED Errno condition check is missing after calling library function CXX.ERRNO.NOT_SET Errno is not reset to zero before calling library function |
ERR30-C(L2) |
CXX.ERRNO.INCORRECTLY_CHECKED Errno condition check not required after calling library function CXX.ERRNO.NOT_CHECKED Errno condition check is missing after calling library function CXX.ERRNO.NOT_SET Errno is not reset to zero before calling library function |
ERR32-C |
MISRA.INCL.SIGNAL.2012 The standard header file signal.h shall not be used MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h |
ERR32-C(L3) |
MISRA.INCL.SIGNAL.2012 The standard header file signal.h shall not be used MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h |
ERR33-C |
NPD.CHECK.MUST Pointer will be dereferenced after it was positively checked for NULL NPD.FUNC.MUST Result of function that may return NULL will be dereferenced SV.RVT.RETVAL_NOTTESTED Ignored Return Value |
ERR33-C(L1) |
NPD.CHECK.MUST Pointer will be dereferenced after it was positively checked for NULL NPD.FUNC.MUST Result of function that may return NULL will be dereferenced SV.RVT.RETVAL_NOTTESTED Ignored Return Value |
ERR34-C |
CERT.ERR.CONV.STR_TO_NUM Detect errors when converting a string to a number MISRA.STDLIB.ATOI Use of 'atof', 'atoi' or 'atol' from library stdlib.h SV.BANNED.RECOMMENDED.SCANF Banned recommended API: unsafe scanf-type functions |
ERR34-C(L3) |
CERT.ERR.CONV.STR_TO_NUM Detect errors when converting a string to a number MISRA.STDLIB.ATOI Use of 'atof', 'atoi' or 'atol' from library stdlib.h SV.BANNED.RECOMMENDED.SCANF Banned recommended API: unsafe scanf-type functions |
EXP30-C |
MISRA.INCR_DECR.OTHER Increment or decrement operator is mixed with other operators in expression PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects |
EXP30-C(L2) |
MISRA.INCR_DECR.OTHER Increment or decrement operator is mixed with other operators in expression PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects |
EXP32-C |
CERT.EXPR.VOLATILE.ADDR Do not access a volatile object through a nonvolatile pointer CERT.EXPR.VOLATILE.ADDR.PARAM Do not pass a volatile object to a function through a nonvolatile pointer CERT.EXPR.VOLATILE.PTRPTR Do not assign a reference to a non-volatile pointer to a volatile pointer-to-pointer |
EXP32-C(L2) |
CERT.EXPR.VOLATILE.ADDR Do not access a volatile object through a nonvolatile pointer CERT.EXPR.VOLATILE.ADDR.PARAM Do not pass a volatile object to a function through a nonvolatile pointer CERT.EXPR.VOLATILE.PTRPTR Do not assign a reference to a non-volatile pointer to a volatile pointer-to-pointer |
EXP33-C |
UNINIT.HEAP.MIGHT Uninitialized Heap Use - possible UNINIT.HEAP.MUST Uninitialized Heap Use UNINIT.STACK.ARRAY.MIGHT Uninitialized Array - possible UNINIT.STACK.ARRAY.MUST Uninitialized Array UNINIT.STACK.ARRAY.PARTIAL.MUST Partially Uninitialized Array UNINIT.STACK.MIGHT Uninitialized Variable - possible UNINIT.STACK.MUST Uninitialized Variable |
EXP33-C(L1) |
UNINIT.HEAP.MIGHT Uninitialized Heap Use - possible UNINIT.HEAP.MUST Uninitialized Heap Use UNINIT.STACK.ARRAY.MIGHT Uninitialized Array - possible UNINIT.STACK.ARRAY.MUST Uninitialized Array UNINIT.STACK.ARRAY.PARTIAL.MUST Partially Uninitialized Array UNINIT.STACK.MIGHT Uninitialized Variable - possible UNINIT.STACK.MUST Uninitialized Variable |
EXP34-C |
NPD.CHECK.CALL.MIGHT Pointer may be passed to function that can dereference it after it was positively checked for NULL NPD.CHECK.CALL.MUST Pointer will be passed to function that may dereference it after it was positively checked for NULL NPD.CHECK.MIGHT Pointer may be dereferenced after it was positively checked for NULL NPD.CHECK.MUST Pointer will be dereferenced after it was positively checked for NULL NPD.CONST.CALL NULL is passed to function that can dereference it NPD.CONST.DEREF NULL is dereferenced NPD.FUNC.CALL.MIGHT Result of function that may return NULL may be passed to another function that may dereference it NPD.FUNC.CALL.MUST Result of function that may return NULL will be passed to another function that may dereference it NPD.FUNC.MIGHT Result of function that can return NULL may be dereferenced NPD.FUNC.MUST Result of function that may return NULL will be dereferenced NPD.GEN.CALL.MIGHT Null pointer may be passed to function that may dereference it NPD.GEN.CALL.MUST Null pointer will be passed to function that may dereference it NPD.GEN.MIGHT Null pointer may be dereferenced NPD.GEN.MUST Null pointer will be dereferenced RNPD.CALL Suspicious dereference of pointer in function call before NULL check RNPD.DEREF Suspicious dereference of pointer before NULL check |
EXP34-C(L1) |
NPD.CHECK.CALL.MIGHT Pointer may be passed to function that can dereference it after it was positively checked for NULL NPD.CHECK.CALL.MUST Pointer will be passed to function that may dereference it after it was positively checked for NULL NPD.CHECK.MIGHT Pointer may be dereferenced after it was positively checked for NULL NPD.CHECK.MUST Pointer will be dereferenced after it was positively checked for NULL NPD.CONST.CALL NULL is passed to function that can dereference it NPD.CONST.DEREF NULL is dereferenced NPD.FUNC.CALL.MIGHT Result of function that may return NULL may be passed to another function that may dereference it NPD.FUNC.CALL.MUST Result of function that may return NULL will be passed to another function that may dereference it NPD.FUNC.MIGHT Result of function that can return NULL may be dereferenced NPD.FUNC.MUST Result of function that may return NULL will be dereferenced NPD.GEN.CALL.MIGHT Null pointer may be passed to function that may dereference it NPD.GEN.CALL.MUST Null pointer will be passed to function that may dereference it NPD.GEN.MIGHT Null pointer may be dereferenced NPD.GEN.MUST Null pointer will be dereferenced RNPD.CALL Suspicious dereference of pointer in function call before NULL check RNPD.DEREF Suspicious dereference of pointer before NULL check |
EXP36-C |
MISRA.CAST.OBJ_PTR_TO_OBJ_PTR.2012 Cast between a pointer to object type and a pointer to a different object type |
EXP36-C(L3) |
MISRA.CAST.OBJ_PTR_TO_OBJ_PTR.2012 Cast between a pointer to object type and a pointer to a different object type |
EXP37-C |
MISRA.FUNC.UNMATCHED.PARAMS Number of formal and actual parameters passed to function do not match |
EXP37-C(L3) |
MISRA.FUNC.UNMATCHED.PARAMS Number of formal and actual parameters passed to function do not match |
EXP39-C |
MISRA.CAST.FUNC_PTR.2012 Conversion performed between a pointer to a function and another incompatible type MISRA.CAST.INCOMPLETE_PTR_TO_ANY.2012 Conversion performed between a pointer to an incomplete type and a different type MISRA.CAST.OBJ_PTR_TO_NON_INT.2012 A cast between a pointer to object and a non-integer arithmetic type MISRA.CAST.OBJ_PTR_TO_OBJ_PTR.2012 Cast between a pointer to object type and a pointer to a different object type |
EXP39-C(L3) |
MISRA.CAST.FUNC_PTR.2012 Conversion performed between a pointer to a function and another incompatible type MISRA.CAST.INCOMPLETE_PTR_TO_ANY.2012 Conversion performed between a pointer to an incomplete type and a different type MISRA.CAST.OBJ_PTR_TO_NON_INT.2012 A cast between a pointer to object and a non-integer arithmetic type MISRA.CAST.OBJ_PTR_TO_OBJ_PTR.2012 Cast between a pointer to object type and a pointer to a different object type |
EXP42-C |
MISRA.STDLIB.MEMCMP.PTR_ARG_TYPES The pointer arguments to the Standard Library function memcmp shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum type |
EXP42-C(L2) |
MISRA.STDLIB.MEMCMP.PTR_ARG_TYPES The pointer arguments to the Standard Library function memcmp shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum type |
EXP43-C |
MISRA.TYPE.RESTRICT.QUAL.2012 The restrict type qualifier shall not be used |
EXP43-C(L3) |
MISRA.TYPE.RESTRICT.QUAL.2012 The restrict type qualifier shall not be used |
EXP44-C |
MISRA.SIZEOF.SIDE_EFFECT Operand of sizeof has side effects |
EXP44-C(L3) |
MISRA.SIZEOF.SIDE_EFFECT Operand of sizeof has side effects |
EXP45-C |
ASSIGCOND.CALL Assignment in condition (call) ASSIGCOND.GEN Assignment in condition MISRA.ASSIGN.COND Assignment operator is used in a condition |
EXP45-C(L2) |
ASSIGCOND.CALL Assignment in condition (call) ASSIGCOND.GEN Assignment in condition MISRA.ASSIGN.COND Assignment operator is used in a condition |
EXP46-C |
MISRA.LOGIC.OPERATOR.NOT_BOOL Operand of non-logical operator is effectively boolean |
EXP46-C(L2) |
MISRA.LOGIC.OPERATOR.NOT_BOOL Operand of non-logical operator is effectively boolean |
EXP47-C |
CERT.VA_ARG.TYPE Do not call va_arg with an argument of the incorrect type |
EXP47-C(L2) |
CERT.VA_ARG.TYPE Do not call va_arg with an argument of the incorrect type |
FIO30-C |
SV.FMTSTR.GENERIC Format String Vulnerability SV.TAINTED.FMTSTR Use of Unvalidated Data in a Format String |
FIO30-C(L1) |
SV.FMTSTR.GENERIC Format String Vulnerability SV.TAINTED.FMTSTR Use of Unvalidated Data in a Format String |
FIO34-C |
CWARN.CMPCHR.EOF A 'char' expression compared with EOF constant |
FIO34-C(L1) |
CWARN.CMPCHR.EOF A 'char' expression compared with EOF constant |
FIO38-C |
MISRA.FILE_PTR.DEREF.2012 A pointer to a FILE object shall not be dereferenced MISRA.FILE_PTR.DEREF.CAST.2012 Object is casted to a FILE pointer, and it shall not be dereferenced MISRA.FILE_PTR.DEREF.INDIRECT.2012 A pointer to a FILE object shall not be indirectly dereferenced by a system function MISRA.FILE_PTR.DEREF.RETURN.2012 A pointer to a FILE object (returned by function) shall not be dereferenced |
FIO38-C(L3) |
MISRA.FILE_PTR.DEREF.2012 A pointer to a FILE object shall not be dereferenced MISRA.FILE_PTR.DEREF.CAST.2012 Object is casted to a FILE pointer, and it shall not be dereferenced MISRA.FILE_PTR.DEREF.INDIRECT.2012 A pointer to a FILE object shall not be indirectly dereferenced by a system function MISRA.FILE_PTR.DEREF.RETURN.2012 A pointer to a FILE object (returned by function) shall not be dereferenced |
FIO39-C |
CERT.FIO.NO_FLUSH Flush or positioning function call missing |
FIO39-C(L2) |
CERT.FIO.NO_FLUSH Flush or positioning function call missing |
FIO42-C |
RH.LEAK Resource leak |
FIO42-C(L3) |
RH.LEAK Resource leak |
FIO44-C |
CERT.FSETPOS.VALUE Only use values for fsetpos() that are returned from fgetpos() |
FIO44-C(L3) |
CERT.FSETPOS.VALUE Only use values for fsetpos() that are returned from fgetpos() |
FIO45-C |
SV.TOCTOU.FILE_ACCESS Time of Creation/Time of Use Race condition in File Access |
FIO45-C(L2) |
SV.TOCTOU.FILE_ACCESS Time of Creation/Time of Use Race condition in File Access |
FIO46-C |
SV.INCORRECT_RESOURCE_HANDLING.URH Insecure Resource Handling |
FIO46-C(L3) |
SV.INCORRECT_RESOURCE_HANDLING.URH Insecure Resource Handling |
FIO47-C |
SV.FMT_STR.PRINT_FORMAT_MISMATCH.BAD Incompatible type of a print function parameter SV.FMT_STR.PRINT_FORMAT_MISMATCH.UNDESIRED Unexpected type of a print function parameter SV.FMT_STR.PRINT_IMPROP_LENGTH Improper use of length modifier in a print function call SV.FMT_STR.PRINT_PARAMS_WRONGNUM.FEW Too few arguments in a print function call SV.FMT_STR.PRINT_PARAMS_WRONGNUM.MANY Too many arguments in a print function call SV.FMT_STR.SCAN_FORMAT_MISMATCH.BAD Incompatible type of a scan function parameter SV.FMT_STR.SCAN_FORMAT_MISMATCH.UNDESIRED Unexpected type of a scan function parameter SV.FMT_STR.SCAN_IMPROP_LENGTH Improper use of length modifier in a scan function call SV.FMT_STR.SCAN_PARAMS_WRONGNUM.FEW Too few arguments in a scan function call SV.FMT_STR.SCAN_PARAMS_WRONGNUM.MANY Too many arguments in a scan function call SV.FMT_STR.UNKWN_FORMAT Unknown format specifier in a print function call |
FIO47-C(L2) |
SV.FMT_STR.PRINT_FORMAT_MISMATCH.BAD Incompatible type of a print function parameter SV.FMT_STR.PRINT_FORMAT_MISMATCH.UNDESIRED Unexpected type of a print function parameter SV.FMT_STR.PRINT_IMPROP_LENGTH Improper use of length modifier in a print function call SV.FMT_STR.PRINT_PARAMS_WRONGNUM.FEW Too few arguments in a print function call SV.FMT_STR.PRINT_PARAMS_WRONGNUM.MANY Too many arguments in a print function call SV.FMT_STR.SCAN_FORMAT_MISMATCH.BAD Incompatible type of a scan function parameter SV.FMT_STR.SCAN_FORMAT_MISMATCH.UNDESIRED Unexpected type of a scan function parameter SV.FMT_STR.SCAN_IMPROP_LENGTH Improper use of length modifier in a scan function call SV.FMT_STR.SCAN_PARAMS_WRONGNUM.FEW Too few arguments in a scan function call SV.FMT_STR.SCAN_PARAMS_WRONGNUM.MANY Too many arguments in a scan function call SV.FMT_STR.UNKWN_FORMAT Unknown format specifier in a print function call |
FLP30-C |
MISRA.FOR.COUNTER.FLT For loop counter has a floating point type |
FLP30-C(L2) |
MISRA.FOR.COUNTER.FLT For loop counter has a floating point type |
FLP34-C |
MISRA.CAST.FLOAT.WIDER Cast of floating point expression to a wider floating point type MISRA.CAST.FLOAT_INT Cast of floating point expression to integral type MISRA.CAST.INT_FLOAT Cast of integral expression to floating point type MISRA.CONV.FLOAT Implicit floating-point conversion |
FLP34-C(L3) |
MISRA.CAST.FLOAT.WIDER Cast of floating point expression to a wider floating point type MISRA.CAST.FLOAT_INT Cast of floating point expression to integral type MISRA.CAST.INT_FLOAT Cast of integral expression to floating point type MISRA.CONV.FLOAT Implicit floating-point conversion |
FLP36-C |
PORTING.CAST.FLTPNT Cast of a floating point expression to a non floating point type |
FLP36-C(L3) |
PORTING.CAST.FLTPNT Cast of a floating point expression to a non floating point type |
FLP37-C |
CERT.MEMCMP.FLOAT_MEMBER Do not compare when member is floating point MISRA.STDLIB.MEMCMP.PTR_ARG_TYPES The pointer arguments to the Standard Library function memcmp shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum type |
FLP37-C(L3) |
CERT.MEMCMP.FLOAT_MEMBER Do not compare when member is floating point MISRA.STDLIB.MEMCMP.PTR_ARG_TYPES The pointer arguments to the Standard Library function memcmp shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum type |
INT30-C |
CWARN.NOEFFECT.OUTOFRANGE Value outside of range NUM.OVERFLOW Possible Overflow NUM.OVERFLOW.DF Possible numeric overflow or wraparound |
INT30-C(L2) |
CWARN.NOEFFECT.OUTOFRANGE Value outside of range NUM.OVERFLOW Possible Overflow NUM.OVERFLOW.DF Possible numeric overflow or wraparound |
INT31-C |
PORTING.CAST.SIZE Expression is cast to a type of potentially different size |
INT31-C(L2) |
PORTING.CAST.SIZE Expression is cast to a type of potentially different size |
INT32-C |
CWARN.NOEFFECT.OUTOFRANGE Value outside of range NUM.OVERFLOW Possible Overflow NUM.OVERFLOW.DF Possible numeric overflow or wraparound |
INT32-C(L2) |
CWARN.NOEFFECT.OUTOFRANGE Value outside of range NUM.OVERFLOW Possible Overflow NUM.OVERFLOW.DF Possible numeric overflow or wraparound |
INT33-C |
DBZ.CONST Division by a zero constant occurs DBZ.CONST.CALL The value '0' is passed to function that can use this value as divisor DBZ.GENERAL Division by zero might occur DBZ.ITERATOR Division by zero might occur in a loop iterator DBZ.ITERATOR.CALL Division by zero might occur in a function call |
INT33-C(L2) |
DBZ.CONST Division by a zero constant occurs DBZ.CONST.CALL The value '0' is passed to function that can use this value as divisor DBZ.GENERAL Division by zero might occur DBZ.ITERATOR Division by zero might occur in a loop iterator DBZ.ITERATOR.CALL Division by zero might occur in a function call |
INT34-C |
MISRA.SHIFT.RANGE.2012 Right operand of shift operation is out of range - greater or equal to the essential type size of left operand, or is negative |
INT34-C(L3) |
MISRA.SHIFT.RANGE.2012 Right operand of shift operation is out of range - greater or equal to the essential type size of left operand, or is negative |
INT36-C |
MISRA.CAST.OBJ_PTR_TO_INT.2012 Conversion performed between a pointer to an object and an integer type |
INT36-C(L3) |
MISRA.CAST.OBJ_PTR_TO_INT.2012 Conversion performed between a pointer to an object and an integer type |
MEM30-C |
UFM.DEREF.MIGHT Use of free memory (access) - possible UFM.DEREF.MUST Use of Freed Memory by Pointer UFM.FFM.MIGHT Use of free memory (double free) - possible UFM.FFM.MUST Freeing Freed Memory UFM.RETURN.MIGHT Use of freed memory (return) - possible UFM.RETURN.MUST Use of Freed Memory on Return UFM.USE.MIGHT Use of free memory - possible UFM.USE.MUST Use of Freed Memory |
MEM30-C(L1) |
UFM.DEREF.MIGHT Use of free memory (access) - possible UFM.DEREF.MUST Use of Freed Memory by Pointer UFM.FFM.MIGHT Use of free memory (double free) - possible UFM.FFM.MUST Freeing Freed Memory UFM.RETURN.MIGHT Use of freed memory (return) - possible UFM.RETURN.MUST Use of Freed Memory on Return UFM.USE.MIGHT Use of free memory - possible UFM.USE.MUST Use of Freed Memory |
MEM31-C |
CL.FFM.ASSIGN Use of free memory (double free) - no operator= CL.FFM.COPY Use of free memory (double free) - no copy constructor CL.SHALLOW.ASSIGN Use of free memory (double free) - shallow copy in operator= CL.SHALLOW.COPY Use of free memory (double free) - shallow copy in copy constructor FMM.MIGHT Freeing Mismatched Memory - possible FMM.MUST Freeing Mismatched Memory |
MEM31-C(L2) |
CL.FFM.ASSIGN Use of free memory (double free) - no operator= CL.FFM.COPY Use of free memory (double free) - no copy constructor CL.SHALLOW.ASSIGN Use of free memory (double free) - shallow copy in operator= CL.SHALLOW.COPY Use of free memory (double free) - shallow copy in copy constructor FMM.MIGHT Freeing Mismatched Memory - possible FMM.MUST Freeing Mismatched Memory |
MEM33-C |
MISRA.INCOMPLETE.STRUCT Incomplete struct type is used MISRA.MEMB.FLEX_ARRAY.2012 Flexible array member shall not be declared |
MEM33-C(L3) |
MISRA.INCOMPLETE.STRUCT Incomplete struct type is used MISRA.MEMB.FLEX_ARRAY.2012 Flexible array member shall not be declared |
MEM34-C |
FNH.MIGHT Freeing Non-Heap Memory - possible FNH.MUST Freeing Non-Heap Memory |
MEM34-C(L1) |
FNH.MIGHT Freeing Non-Heap Memory - possible FNH.MUST Freeing Non-Heap Memory |
MEM35-C |
INCORRECT.ALLOC_SIZE Incorrect Allocation Size SV.TAINTED.ALLOC_SIZE Use of Unvalidated Integer in Memory Allocation |
MEM35-C(L2) |
INCORRECT.ALLOC_SIZE Incorrect Allocation Size SV.TAINTED.ALLOC_SIZE Use of Unvalidated Integer in Memory Allocation |
MEM36-C |
AUTOSAR.STDLIB.MEMORY Functions malloc, calloc, realloc and free shall not be used |
MEM36-C(L3) |
AUTOSAR.STDLIB.MEMORY Functions malloc, calloc, realloc and free shall not be used |
MSC30-C |
CERT.MSC.STD_RAND_CALL Do not use std::rand() for generating pseudorandom numbers |
MSC30-C(L2) |
CERT.MSC.STD_RAND_CALL Do not use std::rand() for generating pseudorandom numbers |
MSC32-C |
CERT.MSC.SEED_RANDOM Properly seed pseudorandom number generators |
MSC32-C(L1) |
CERT.MSC.SEED_RANDOM Properly seed pseudorandom number generators |
MSC33-C |
CERT.MSC.ASCTIME Do not pass invalid data to the asctime() function |
MSC33-C(L1) |
CERT.MSC.ASCTIME Do not pass invalid data to the asctime() function |
MSC37-C |
FUNCRET.GEN Non-void function does not return value FUNCRET.IMPLICIT Non-void function implicitly returning int does not return value |
MSC37-C(L2) |
FUNCRET.GEN Non-void function does not return value FUNCRET.IMPLICIT Non-void function implicitly returning int does not return value |
MSC39-C |
VA.LIST.INDETERMINATE Attempt to call va_arg() on a va_list that has an indeterminate value |
MSC39-C(L3) |
VA.LIST.INDETERMINATE Attempt to call va_arg() on a va_list that has an indeterminate value |
MSC40-C |
MISRA.FUNC.STATIC.REDECL Function or object redeclaration does not include 'static' modifier |
MSC40-C(L3) |
MISRA.FUNC.STATIC.REDECL Function or object redeclaration does not include 'static' modifier |
MSC41-C |
CXX.SV.PWD.PLAIN Attempt to set password using a plain string CXX.SV.PWD.PLAIN.LENGTH Attempt to set password with a length less than 15 characters CXX.SV.PWD.PLAIN.LENGTH.ZERO Attempt to set password with a length of zero characters HCC Use of hardcoded credentials HCC.PWD Use of a hardcoded password HCC.USER Use of a hardcoded user name |
MSC41-C(L1) |
CXX.SV.PWD.PLAIN Attempt to set password using a plain string CXX.SV.PWD.PLAIN.LENGTH Attempt to set password with a length less than 15 characters CXX.SV.PWD.PLAIN.LENGTH.ZERO Attempt to set password with a length of zero characters HCC Use of hardcoded credentials HCC.PWD Use of a hardcoded password HCC.USER Use of a hardcoded user name |
POS30-C |
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds |
POS30-C(L1) |
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds |
POS34-C |
CERT.PUTENV.AUTO_VARIABLE Do not call putenv() with a pointer to an automatic variable as the argument |
POS34-C(L2) |
CERT.PUTENV.AUTO_VARIABLE Do not call putenv() with a pointer to an automatic variable as the argument |
POS35-C |
CERT.STR.ASSIGN.CONST_TO_NONCONST Do not assign a const char pointer to a non-const char pointer SV.TOCTOU.FILE_ACCESS Time of Creation/Time of Use Race condition in File Access |
POS35-C(L1) |
CERT.STR.ASSIGN.CONST_TO_NONCONST Do not assign a const char pointer to a non-const char pointer SV.TOCTOU.FILE_ACCESS Time of Creation/Time of Use Race condition in File Access |
POS36-C |
SV.USAGERULES.PERMISSIONS Use of Privilege Elevation |
POS36-C(L1) |
SV.USAGERULES.PERMISSIONS Use of Privilege Elevation |
POS37-C |
SV.USAGERULES.PERMISSIONS Use of Privilege Elevation |
POS37-C(L1) |
SV.USAGERULES.PERMISSIONS Use of Privilege Elevation |
POS39-C |
BYTEORDER.HTON.SEND Missed conversion from host to network byte order BYTEORDER.HTON.WRITE Missed conversion from host to network byte order BYTEORDER.NTOH.READ Missed conversion from network to host byte order BYTEORDER.NTOH.RECV Missed conversion from network to host byte order |
POS39-C(L1) |
BYTEORDER.HTON.SEND Missed conversion from host to network byte order BYTEORDER.HTON.WRITE Missed conversion from host to network byte order BYTEORDER.NTOH.READ Missed conversion from network to host byte order BYTEORDER.NTOH.RECV Missed conversion from network to host byte order |
POS44-C |
MISRA.INCL.SIGNAL.2012 The standard header file signal.h shall not be used |
POS44-C(L2) |
MISRA.INCL.SIGNAL.2012 The standard header file signal.h shall not be used |
POS47-C |
CERT.POS.THREAD.ASYNC_CANCEL Do not use threads that can be canceled asynchronously |
POS47-C(L1) |
CERT.POS.THREAD.ASYNC_CANCEL Do not use threads that can be canceled asynchronously |
POS51-C |
CONC.DL Deadlock CONC.NO_UNLOCK Missing unlock for variable |
POS51-C(L3) |
CONC.DL Deadlock CONC.NO_UNLOCK Missing unlock for variable |
POS52-C |
CONC.SLEEP Function may block in critical section |
POS52-C(L3) |
CONC.SLEEP Function may block in critical section |
POS54-C |
SV.RVT.RETVAL_NOTTESTED Ignored Return Value |
POS54-C(L1) |
SV.RVT.RETVAL_NOTTESTED Ignored Return Value |
PRE30-C |
MISRA.DEFINE.SHARP # or ## operator in a macro definition |
PRE30-C(L3) |
MISRA.DEFINE.SHARP # or ## operator in a macro definition |
PRE31-C |
PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects |
PRE31-C(L3) |
PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects |
PRE32-C |
MISRA.EXPANSION.DIRECTIVE Directive-like tokens within a macro argument |
PRE32-C(L3) |
MISRA.EXPANSION.DIRECTIVE Directive-like tokens within a macro argument |
SIG30-C |
CERT.SIG.SIG_HANDLER.ASYNC_SAFE Call only asynchronous-safe functions within signal handlers |
SIG30-C(L1) |
CERT.SIG.SIG_HANDLER.ASYNC_SAFE Call only asynchronous-safe functions within signal handlers |
SIG34-C |
MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h |
SIG34-C(L3) |
MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h |
SIG35-C |
CERT.STDLIB.SIGNAL Do not return from a computational exception signal handler |
SIG35-C(L3) |
CERT.STDLIB.SIGNAL Do not return from a computational exception signal handler |
STR30-C |
CERT.STR.ARG.CONST_TO_NONCONST Do not pass a const char pointer to a non-const char pointer argument CERT.STR.ASSIGN.CONST_TO_NONCONST Do not assign a const char pointer to a non-const char pointer |
STR30-C(L2) |
CERT.STR.ARG.CONST_TO_NONCONST Do not pass a const char pointer to a non-const char pointer argument CERT.STR.ASSIGN.CONST_TO_NONCONST Do not assign a const char pointer to a non-const char pointer |
STR31-C |
SV.FMT_STR.BAD_SCAN_FORMAT Input format specifier error SV.UNBOUND_STRING_INPUT.FUNC Usage of unbounded string input |
STR31-C(L1) |
SV.FMT_STR.BAD_SCAN_FORMAT Input format specifier error SV.UNBOUND_STRING_INPUT.FUNC Usage of unbounded string input |
STR32-C |
NNTS.MIGHT Buffer Overflow - Non-null Terminated String NNTS.MUST Buffer Overflow - Non-null Terminated String SV.STRBO.BOUND_COPY.UNTERM Possible Buffer Overflow in Following String Operations |
STR32-C(L1) |
NNTS.MIGHT Buffer Overflow - Non-null Terminated String NNTS.MUST Buffer Overflow - Non-null Terminated String SV.STRBO.BOUND_COPY.UNTERM Possible Buffer Overflow in Following String Operations |
STR34-C |
CXX.CAST.SIGNED_CHAR_TO_INTEGER Cast char to unsigned char before converting to larger integer sizes |
STR34-C(L2) |
CXX.CAST.SIGNED_CHAR_TO_INTEGER Cast char to unsigned char before converting to larger integer sizes |
STR37-C |
AUTOSAR.STDLIB.CCTYPE.UCHAR Arguments to character-handling functions defined in <cctype> shall be representable as an unsigned char MISRA.ETYPE.ASSIGN.2012 Assignment to an object of a narrower essential type or a different essential type category |
STR37-C(L3) |
AUTOSAR.STDLIB.CCTYPE.UCHAR Arguments to character-handling functions defined in <cctype> shall be representable as an unsigned char MISRA.ETYPE.ASSIGN.2012 Assignment to an object of a narrower essential type or a different essential type category |
STR38-C |
CXX.DIFF.WIDTH.STR_AND_FUNC Implicit cast between narrow and wide character string while calling function |
STR38-C(L1) |
CXX.DIFF.WIDTH.STR_AND_FUNC Implicit cast between narrow and wide character string while calling function |
WIN30-C |
FMM.MIGHT Freeing Mismatched Memory - possible FMM.MUST Freeing Mismatched Memory |
WIN30-C(L2) |
FMM.MIGHT Freeing Mismatched Memory - possible FMM.MUST Freeing Mismatched Memory |
CERT C recommendations
Rule | Checker name and description |
---|---|
ARR00-C(L2) |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds ABV.ITERATOR Buffer Overflow - Array Index may be out of Bounds ABV.MEMBER Buffer Overflow - Array Index Out of Bounds ABV.STACK Buffer Overflow - Local Array Index Out of Bounds ABV.TAINTED Buffer Overflow from Unvalidated Input ABV.UNICODE.BOUND_MAP Buffer overflow in mapping character function ABV.UNICODE.FAILED_MAP Mapping function failed ABV.UNICODE.NNTS_MAP Buffer overflow in mapping character function ABV.UNICODE.SELF_MAP Mapping function failed ABV.UNKNOWN_SIZE Buffer Overflow - Array Index Out of Bounds NNTS.MIGHT Buffer Overflow - Non-null Terminated String NNTS.MUST Buffer Overflow - Non-null Terminated String NNTS.TAINTED Unvalidated User Input Causing Buffer Overflow - Non-Null Terminated String SV.STRBO.BOUND_COPY.OVERFLOW Buffer Overflow in Bound String Copy SV.STRBO.BOUND_COPY.UNTERM Possible Buffer Overflow in Following String Operations SV.STRBO.BOUND_SPRINTF Buffer Overflow in Bound sprintf SV.STRBO.UNBOUND_COPY Buffer Overflow in Unbound String Copy SV.STRBO.UNBOUND_SPRINTF Buffer Overflow in Unbound sprintf SV.TAINTED.ALLOC_SIZE Use of Unvalidated Integer in Memory Allocation SV.TAINTED.CALL.INDEX_ACCESS Use of Unvalidated Integer as Array Index by Function Call SV.TAINTED.CALL.LOOP_BOUND Use of Unvalidated Integer in Loop Condition through a Function Call SV.TAINTED.INDEX_ACCESS Use of Unvalidated Integer as Array Index SV.TAINTED.LOOP_BOUND Use of Unvalidated Integer in Loop Condition SV.UNBOUND_STRING_INPUT.CIN Usage of cin for unbounded string input SV.UNBOUND_STRING_INPUT.FUNC Usage of unbounded string input |
ARR01-C(L1) |
CWARN.MEMSET.SIZEOF.PTR Memset-like function is called for 'sizeof' applied to pointer |
CON05-C(L3) |
CONC.SLEEP Function may block in critical section |
DCL01-C(L3) |
MISRA.VAR.HIDDEN Identifier declared in an inner scope hides identifier in outer scope |
DCL06-C(L3) |
CERT.LITERAL.ARRAY Use meaningful symbolic constants to represent literal array size values CERT.LITERAL.BITFIELD Use meaningful symbolic constants to represent literal bit-field values CERT.LITERAL.CHAR.CONST Use meaningful symbolic constants to represent literal character values CERT.LITERAL.FLT.CONST Use meaningful symbolic constants to represent literal float values CERT.LITERAL.INT.CONST Use meaningful symbolic constants to represent literal integer values CERT.LITERAL.STR.CONST Use meaningful symbolic constants to represent literal string values |
DCL07-C(L3) |
MISRA.CAST.FUNC_PTR.2012 Conversion performed between a pointer to a function and another incompatible type MISRA.FUNC.NOPROT.DEF.2012 Function has a definition but no prototype MISRA.FUNC.PROT_FORM.KR.2012 Function types shall be in prototype form |
DCL10-C(L2) |
SV.FMT_STR.PRINT_PARAMS_WRONGNUM.FEW Too few arguments in a print function call SV.FMT_STR.PRINT_PARAMS_WRONGNUM.MANY Too many arguments in a print function call SV.FMT_STR.SCAN_PARAMS_WRONGNUM.FEW Too few arguments in a scan function call SV.FMT_STR.SCAN_PARAMS_WRONGNUM.MANY Too many arguments in a scan function call |
DCL11-C(L2) |
MISRA.FUNC.VARARG Function with variable number of arguments SV.FMT_STR.PRINT_FORMAT_MISMATCH.BAD Incompatible type of a print function parameter SV.FMT_STR.PRINT_FORMAT_MISMATCH.UNDESIRED Unexpected type of a print function parameter SV.FMT_STR.PRINT_IMPROP_LENGTH Improper use of length modifier in a print function call SV.FMT_STR.PRINT_PARAMS_WRONGNUM.FEW Too few arguments in a print function call SV.FMT_STR.PRINT_PARAMS_WRONGNUM.MANY Too many arguments in a print function call SV.FMT_STR.SCAN_FORMAT_MISMATCH.BAD Incompatible type of a scan function parameter SV.FMT_STR.SCAN_FORMAT_MISMATCH.UNDESIRED Unexpected type of a scan function parameter SV.FMT_STR.UNKWN_FORMAT.SCAN Unknown format specifier in a scan function call |
DCL13-C(L3) |
MISRA.PPARAM.NEEDS.CONST Pointer parameter is not used to modify the addressed object but is not declared as a pointer to const |
DCL18-C(L3) |
MISRA.TOKEN.OCTAL.ESCAPE Usage of octal escape sequences MISRA.TOKEN.OCTAL.INT Usage of octal integer constants |
DCL19-C(L3) |
CERT.STATIC.SINGLE.USE File scope static variable is only accessed in one function CERT.TU.UNUSED.GLOBAL.DECL Global identifier is declared but is not used in this translation unit CXX.ID_VIS.GLOBAL_VARIABLE.EXTERN Visibility of extern global variable is too wide CXX.ID_VIS.GLOBAL_VARIABLE.STATIC Visibility of static global variable is too wide MISRA.VAR.MIN.VIS Name visibility is too wide |
DCL20-C(L1) |
MISRA.FUNC.NO_PARAMS Function without parameters is missing void parameter type |
DCL23-C(L2) |
MISRA.IDENT.DISTINCT.C99.2012 Identifiers declared in the same scope or name space are not distinct |
ENV01-C(L1) |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds ABV.ITERATOR Buffer Overflow - Array Index may be out of Bounds ABV.MEMBER Buffer Overflow - Array Index Out of Bounds ABV.STACK Buffer Overflow - Local Array Index Out of Bounds ABV.TAINTED Buffer Overflow from Unvalidated Input ABV.UNICODE.BOUND_MAP Buffer overflow in mapping character function ABV.UNICODE.FAILED_MAP Mapping function failed ABV.UNICODE.NNTS_MAP Buffer overflow in mapping character function ABV.UNICODE.SELF_MAP Mapping function failed ABV.UNKNOWN_SIZE Buffer Overflow - Array Index Out of Bounds |
EXP00-C(L3) |
CERT.EXPR.PARENS The precedence of operators within expressions should be made explicit. |
EXP02-C(L3) |
MISRA.LOGIC.SIDEEFF Right operand in a logical 'and' or 'or' expression contains side effects |
EXP08-C(L2) |
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds ABV.ITERATOR Buffer Overflow - Array Index may be out of Bounds |
EXP10-C(L2) |
CERT.MULTI.FUNC.ARG.CALLS Do not depend on the order of evaluation of subexpressions or the order in which side effects take place |
EXP12-C(L3) |
MISRA.FUNC.UNUSEDRET.2012 The return value of a non-void function shall be used. SV.RVT.RETVAL_NOTTESTED Ignored Return Value |
EXP15-C(L1) |
SEMICOL Suspiciously placed semicolon |
EXP16-C(L2) |
CWARN.FUNCADDR Function address is used instead of a call to this function CWARN.NULLCHECK.FUNCNAME Function address was directly compared against 0 |
EXP19-C(L2) |
MISRA.IF.NO_COMPOUND The body of if/else statement is not a compound statement MISRA.STMT.NO_COMPOUND The body of switch, while, do/while or for statement is not a compound statement |
FIO01-C(L1) |
SV.TOCTOU.FILE_ACCESS Time of Creation/Time of Use Race condition in File Access |
FIO02-C(L2) |
SV.DLLPRELOAD.NONABSOLUTE.DLL Potential DLL-preload hijack vector SV.TOCTOU.FILE_ACCESS Time of Creation/Time of Use Race condition in File Access |
FIO22-C(L3) |
RH.LEAK Resource leak |
FLP07-C(L3) |
CERT.RTN.FLT.CAST.DBL Cast the return value of a function that returns a floating-point type CERT.RTN.FLT.IMPLICIT.CAST.DBL Cast the return value of a function that returns a floating-point type |
INT02-C(L2) |
MISRA.CAST.INT Non-trivial integer expression is cast to a wider type, or type with a different signedness MISRA.CAST.UNSIGNED_BITS The result of bitwise operation on unsigned char or short is not cast back to original type MISRA.CONV.INT.SIGN Implicit integral conversion changes signedness MISRA.CVALUE.IMPL.CAST The value of an expression implicitly converted to a different type MISRA.UMINUS.UNSIGNED Operand of unary minus is unsigned PRECISION.LOSS Loss of Precision |
INT04-C(L2) |
SV.TAINTED.ALLOC_SIZE Use of Unvalidated Integer in Memory Allocation SV.TAINTED.BINOP Use of Unvalidated Integer in Binary Operation SV.TAINTED.CALL.BINOP Use of Unvalidated Integer in Binary Operation SV.TAINTED.CALL.INDEX_ACCESS Use of Unvalidated Integer as Array Index by Function Call SV.TAINTED.CALL.LOOP_BOUND Use of Unvalidated Integer in Loop Condition through a Function Call SV.TAINTED.INDEX_ACCESS Use of Unvalidated Integer as Array Index SV.TAINTED.LOOP_BOUND Use of Unvalidated Integer in Loop Condition |
INT07-C(L2) |
PORTING.SIGNED.CHAR 'char' used without explicitly specifying signedness |
INT09-C(L3) |
MISRA.ENUM.IMPLICIT.VAL.NON_UNIQUE.2012 Implicit enumerator value is not unique |
INT12-C(L3) |
MISRA.BITFIELD.TYPE Type of bit-field is not signed/unsigned integer |
INT13-C(L2) |
MISRA.BITS.NOT_UNSIGNED Operand of bitwise operation is not unsigned integer MISRA.BITS.NOT_UNSIGNED.PREP Operand of bitwise operation is not unsigned integer |
INT18-C(L1) |
PORTING.CAST.SIZE Expression is cast to a type of potentially different size |
MEM00-C(L1) |
FNH.MIGHT Freeing Non-Heap Memory - possible FNH.MUST Freeing Non-Heap Memory FUM.GEN.MIGHT Freeing Unallocated Memory - possible FUM.GEN.MUST Freeing Unallocated Memory MLK.MIGHT Memory Leak - possible MLK.MUST Memory Leak MLK.RET.MIGHT Memory Leak - possible MLK.RET.MUST Memory Leak RH.LEAK Resource leak UFM.DEREF.MIGHT Use of free memory (access) - possible UFM.DEREF.MUST Use of Freed Memory by Pointer UFM.FFM.MIGHT Use of free memory (double free) - possible UFM.FFM.MUST Freeing Freed Memory UFM.RETURN.MIGHT Use of freed memory (return) - possible UFM.RETURN.MUST Use of Freed Memory on Return UFM.USE.MIGHT Use of free memory - possible UFM.USE.MUST Use of Freed Memory |
MEM05-C(L1) |
MISRA.FUNC.RECUR Recursive function |
MEM12-C(L3) |
MLK.MIGHT Memory Leak - possible MLK.MUST Memory Leak MLK.RET.MIGHT Memory Leak - possible MLK.RET.MUST Memory Leak RH.LEAK Resource leak |
MSC01-C(L2) |
CWARN.EMPTY.LABEL Empty label statement INFINITE_LOOP.GLOBAL Infinite loop INFINITE_LOOP.LOCAL Infinite loop INFINITE_LOOP.MACRO Infinite loop LA_UNUSED Label unused MISRA.IF.NO_ELSE A chain of if/else-if statements is not terminated with else or is terminated with an empty else clause MISRA.SWITCH.NODEFAULT No default clause at the end of a switch statement MISRA.SWITCH.WELL_FORMED.DEFAULT.2012 Every switch statement shall have a default label. |
MSC07-C(L3) |
INVARIANT_CONDITION.UNREACH Invariant expression in a condition LA_UNUSED Label unused UNREACH.ENUM Code is unreachable due to the possible value(s) of an enum UNREACH.GEN Unreachable code UNREACH.RETURN Unreachable Void Return UNREACH.SIZEOF Architecture-related unreachable code |
MSC12-C(L3) |
CWARN.NOEFFECT.SELF_ASSIGN A variable is assigned to self CWARN.NOEFFECT.UCMP.GE Comparison of unsigned value against 0 is always true CWARN.NOEFFECT.UCMP.GE.MACRO Comparison of unsigned value against 0 within a macro is always true CWARN.NOEFFECT.UCMP.LT Comparison of unsigned value against 0 is always false CWARN.NOEFFECT.UCMP.LT.MACRO Comparison of unsigned value against 0 within a macro is always false CWARN.NULLCHECK.FUNCNAME Function address was directly compared against 0 EFFECT Statement has no effect INVARIANT_CONDITION.UNREACH Invariant expression in a condition LA_UNUSED Label unused MISRA.ARRAY.VAR_LENGTH.2012 Variable-length array types shall not be used MISRA.STMT.NO_EFFECT The statement has no side effects, and does not change control flow UNREACH.ENUM Code is unreachable due to the possible value(s) of an enum UNREACH.GEN Unreachable code UNREACH.RETURN Unreachable Void Return UNREACH.SIZEOF Architecture-related unreachable code VA_UNUSED.GEN Value is Never Used after Assignment VA_UNUSED.INIT Value is Never Used after Initialization |
MSC13-C(L3) |
LV_UNUSED.GEN Local variable unused VA_UNUSED.GEN Value is Never Used after Assignment VA_UNUSED.INIT Value is Never Used after Initialization |
MSC14-C(L3) |
CERT.ALIGNOF Use of '__alignof__' is a language extension CERT.ANONYMOUS.STRUCT Definition of an anonymous struct object is a language extension CERT.ANONYMOUS.UNION Definition of an anonymous union object is a language extension CERT.ARRAY.LENGTH.ZERO Arrays of length zero are a language extension CERT.BITFIELD.NOT.INT Bit-field not defined as 'int' type is a language extension CERT.BITFIELD.SIGN.MODIFIER Bit-field not defined as signed or unsigned is implementation defined CERT.EMPTY.AGR.INIT Empty aggregate initializers are a language extension CERT.ENUM.LITERAL.TYPE.INT Enumeration literal constant is not of type int CERT.ENUM.TYPE.SPECIFIER Non-standard extended enum type specifier is a language extension CERT.FIXED.MEMORY.ADDRESS Use of '@ address' is a language extension CERT.LITERAL.BINARY Use of binary constant is a language extension CERT.LITERAL.MULTIBYTE.CHAR Assignment of multi-byte character constant is implementation defined CERT.LITERAL.OCTAL Use of octal constant is a language extension CERT.LITERAL.SUFFIX.I64 Use of I64 or UI64 as an integer constant suffix is a language extension CERT.NAME.DOLLAR.CHAR Use '$' of character in object name is not a legal identifier in ISO C CERT.STMT.EXPR Use of a statement expression is a language extension CERT.STR.RANGE.FORMATTER Use of string range formatter is implementation defined CERT.TYPEOF Use of '__typeof__' is a language extension CERT.UNNAMED.MEMBER Definition of an unnamed member in a struct or union is a language extension |
MSC17-C(L1) |
MISRA.SWITCH.WELL_FORMED.BREAK.2012 An unconditional break statement shall terminate every switch-clause. |
POS02-C(L2) |
SV.USAGERULES.PERMISSIONS Use of Privilege Elevation |
POS05-C(L3) |
CERT.CHROOT Use of chroot function CERT.CHROOT.CHDIR Call to 'chroot' function is not followed by call to 'chdir' |
PRE00-C(L3) |
MISRA.DEFINE.FUNC Function-like macro definition |
PRE01-C(L1) |
MISRA.DEFINE.NOPARS Macro parameter with no parentheses |
PRE02-C(L1) |
MISRA.DEFINE.BADEXP Inappropriate macro expansion |
PRE05-C(L3) |
MISRA.DEFINE.SHARP.ORDER.2012 Unspecified order of evaluation of multiple '#' or '##' |
PRE06-C(L3) |
MISRA.INCGUARD Include guard is not provided |
PRE10-C(L1) |
MISRA.DEFINE.BADEXP Inappropriate macro expansion |
STR02-C(L1) |
NNTS.TAINTED Unvalidated User Input Causing Buffer Overflow - Non-Null Terminated String SV.TAINTED.INJECTION Command Injection |
STR03-C(L2) |
NNTS.MIGHT Buffer Overflow - Non-null Terminated String NNTS.MUST Buffer Overflow - Non-null Terminated String |
STR05-C(L3) |
MISRA.STRING_LITERAL.NON_CONST.2012 A string literal shall not be assigned to an object unless the object's type is pointer to const-qualified char |
WIN00-C(L1) |
SV.DLLPRELOAD.NONABSOLUTE.DLL Potential DLL-preload hijack vector SV.DLLPRELOAD.NONABSOLUTE.EXE Potential process injection vector SV.DLLPRELOAD.SEARCHPATH Do not use SearchPath to find DLLs |
"MISRA", "MISRA C" and "MISRA C++" are registered trademarks of The MISRA Consortium Limited.