Hyundai-Kia Motor Corp (HKMC) Secure C Coding Standard for Automotive Development mapped to Klocwork and Klocwork community checkers
Rule | Checker name and description |
---|---|
C-ARR-001 |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL 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.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 |
C-ARR-002 |
MISRA.ARRAY.VAR_LENGTH.2012 Variable-length array types shall not be used |
C-ARR-003 |
MISRA.PTR.ARITH Pointer is used in arithmetic or array index expression |
C-ARR-004 |
MISRA.PTR.ARITH.2012 Pointer is used in arithmetic expression |
C-ARR-005 |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.ITERATOR Buffer Overflow - Array Index may be out of Bounds ABV.STACK Buffer Overflow - Local Array Index Out of Bounds ABV.TAINTED Buffer Overflow from Unvalidated Input ABV.UNKNOWN_SIZE Buffer Overflow - Array Index Out of Bounds |
C-ARR-006 |
MISRA.PTR.ARITH.2012 Pointer is used in arithmetic expression MISRA.PTR.ARITH.NOT_SAME.2012 A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand |
C-ARR-007 |
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds |
C-ARR-008 |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL 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.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 RABV.CHECK Suspicious use of index before boundary check RN.INDEX Suspicious use of index before negative check SV.FMT_STR.BAD_SCAN_FORMAT Input format specifier error 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.UNBOUND_STRING_INPUT.CIN Usage of cin for unbounded string input SV.UNBOUND_STRING_INPUT.FUNC Usage of unbounded string input |
C-ARR-009 |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL 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.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 RABV.CHECK Suspicious use of index before boundary check RN.INDEX Suspicious use of index before negative check SV.FMT_STR.BAD_SCAN_FORMAT Input format specifier error 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.UNBOUND_STRING_INPUT.CIN Usage of cin for unbounded string input SV.UNBOUND_STRING_INPUT.FUNC Usage of unbounded string input |
C-ARR-010 |
MISRA.FUNC.UNMATCHED.PARAM |
C-ARR-011 |
SV.RVT.RETVAL_NOTTESTED Ignored Return Value |
C-CON-002 |
CERT.CONC.MUTEX.DESTROY_WHILE_LOCKED Do not destroy a mutex while it is locked |
C-CON-004 |
CERT.CONC.LIB_FUNC_USE Avoid race conditions when using library functions |
C-CON-006 |
CONC.DL Deadlock |
C-CON-007 |
CERT.CONC.WAKE_IN_LOOP_C Wrap functions that can spuriously wake up in a loop |
C-CON-008 |
MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h |
C-CON-009 |
CERT.CONC.UNSAFE_COND_VAR_C Preserve thread safety and liveness when using condition variables |
C-CON-011 |
CERT.CONC.ATOMIC_TWICE_EXPR Do not refer to an atomic variable twice in an expression |
C-DCI-001 |
LOCRET.ARG Function returns address of local variable LOCRET.GLOB Function returns address of local variable LOCRET.RET Function returns address of local variable |
C-DCI-002 |
MISRA.FUNC.STATIC.REDECL Function or object redeclaration does not include 'static' modifier |
C-DCI-003 |
MISRA.DEFINE.WRONGNAME Usage of a name from the standard library for naming a macro 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 MISRA.UNDEF.WRONGNAME Undefinition of a name from the standard library MISRA.UNDEF.WRONGNAME.UNDERSCORE Undefinition of a reserved name |
C-DCI-004 |
CERT.STRUCT.FLEXIBLE_ARRAY_MEMBER Use the correct syntax when declaring a flexible array member |
C-DCI-005 |
PORTING.STORAGE.STRUCT Byte position of elements in a structure could depend on alignment and packing attributes. PORTING.STRUCT.BOOL Struct/class has a bool member |
C-DCI-006 |
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 |
C-DCI-007 |
MISRA.SWITCH.WELL_FORMED.2012 All switch statements shall be well-formed. |
C-DCI-008 |
CERT.DCL.SWITCH.VAR_BEFORE_CASE Do not declare variables inside a switch statement before the first case label |
C-DCI-009 |
MISRA.SWITCH.NODEFAULT No default clause at the end of a switch statement |
C-DCI-010 |
MISRA.SWITCH.NO_BREAK No break or throw statement at the end of switch-clause |
C-DCI-011 |
MISRA.EXPR.PARENS.2012 The precedence of operators within expressions should be made explicit. |
C-DCI-012 |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL 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 |
C-ENV-001 |
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 |
C-ENV-002 |
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 |
C-ENV-004 |
MISRA.STDLIB.ABORT Use of 'abort', 'exit', 'getenv' or 'system' from library stdlib.h SV.CODE_INJECTION.SHELL_EXEC Command Injection into Shell Execution SV.TAINTED.INJECTION Command Injection |
C-ERR-001 |
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 |
C-ERR-002 |
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 |
C-ERR-003 |
MISRA.STDLIB.ATOI Use of 'atof', 'atoi' or 'atol' from library stdlib.h |
C-EXP-001 |
MISRA.FUNC.UNUSEDRET.2012 The return value of a non-void function shall be used. SV.RVT.RETVAL_NOTTESTED Ignored Return Value |
C-EXP-002 |
MISRA.INCR_DECR.SIDEEFF.2012 A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator MISRA.LOGIC.SIDEEFF Right operand in a logical 'and' or 'or' expression contains side effects 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 PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects |
C-EXP-003 |
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 |
C-EXP-004 |
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 |
C-EXP-005 |
ASSIGCOND.CALL Assignment in condition (call) ASSIGCOND.GEN Assignment in condition EFFECT Statement has no effect |
C-EXP-006 |
ASSIGCOND.CALL Assignment in condition (call) ASSIGCOND.GEN Assignment in condition EFFECT Statement has no effect |
C-EXP-007 |
SV.TAINTED.CALL.LOOP_BOUND Use of Unvalidated Integer in Loop Condition through a Function Call SV.TAINTED.LOOP_BOUND Use of Unvalidated Integer in Loop Condition |
C-EXP-008 |
MISRA.FUNC.RECUR Recursive function |
C-EXP-009 |
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 |
C-EXP-010 |
MISRA.CAST.PTR.UNRELATED Object of pointer type cast to unrelated type MISRA.CAST.PTR_TO_INT Cast between a pointer and an integral type PORTING.CAST.PTR Cast between types that are not both pointers or not pointers PORTING.CAST.PTR.FLTPNT Cast of a pointer to a floating point expression to a non floating point type pointer PORTING.CAST.PTR.SIZE Attempt to cast an expression to a type of a potentially incompatible size |
C-EXP-011 |
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 |
C-EXP-012 |
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 |
C-EXP-013 |
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 |
C-EXP-014 |
MISRA.TYPE.RESTRICT.QUAL.2012 The restrict type qualifier shall not be used |
C-EXP-015 |
MISRA.SIZEOF.SIDE_EFFECT Operand of sizeof has side effects |
C-EXP-016 |
ASSIGCOND.CALL Assignment in condition (call) ASSIGCOND.GEN Assignment in condition MISRA.ASSIGN.COND Assignment operator is used in a condition |
C-EXP-017 |
MISRA.LOGIC.OPERATOR.NOT_BOOL Operand of non-logical operator is effectively boolean |
C-EXP-019 |
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.STACK Buffer Overflow - Local Array Index Out of Bounds |
C-FIO-001 |
SV.FMTSTR.GENERIC Format String Vulnerability SV.TAINTED.FMTSTR Use of Unvalidated Data in a Format String |
C-FIO-002 |
CWARN.CMPCHR.EOF A 'char' expression compared with EOF constant |
C-FIO-006 |
PORTING.CMPSPEC.EFFECTS.ASSIGNMENT Assignment in a function parameter PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects |
C-FIO-007 |
RH.LEAK Resource leak |
C-FIO-008 |
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 |
C-FIO-009 |
SV.TOCTOU.FILE_ACCESS Time of Creation/Time of Use Race condition in File Access |
C-FLP-001 |
MISRA.FOR.COND.FLT Floating point object is used in the condition section of a 'for' loop MISRA.FOR.COUNTER.FLT For loop counter has a floating point type |
C-FLP-002 |
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 |
C-FLP-003 |
PORTING.CAST.FLTPNT Cast of a floating point expression to a non floating point type |
C-INT-001 |
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 PRECISION.LOSS.INIT Loss of Precision during initialization |
C-INT-002 |
NUM.OVERFLOW Possible Overflow NUM.OVERFLOW.DF Possible numeric overflow or wraparound SV.TAINTED.BINOP Use of Unvalidated Integer in Binary Operation SV.TAINTED.CALL.BINOP Use of Unvalidated Integer in Binary Operation |
C-INT-003 |
PRECISION.LOSS Loss of Precision PRECISION.LOSS.CALL Loss of Precision during function call PRECISION.LOSS.INIT Loss of Precision during initialization |
C-INT-004 |
CWARN.NOEFFECT.OUTOFRANGE Value outside of range NUM.OVERFLOW Possible Overflow NUM.OVERFLOW.DF Possible numeric overflow or wraparound |
C-INT-005 |
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 |
C-INT-006 |
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 |
C-INT-007 |
NUM.OVERFLOW Possible Overflow NUM.OVERFLOW.DF Possible numeric overflow or wraparound |
C-INT-008 |
MISRA.CAST.OBJ_PTR_TO_INT.2012 Conversion performed between a pointer to an object and an integer type MISRA.CAST.OBJ_PTR_TO_NON_INT.2012 A cast between a pointer to object and a non-integer arithmetic type MISRA.CAST.VOID_PTR_TO_INT.2012 Cast between a pointer to void and an arithmetic type MISRA.PTR.ARITH.2012 Pointer is used in arithmetic expression PORTING.CAST.PTR Cast between types that are not both pointers or not pointers |
C-INT-009 |
CXX.MALLOC.SIZEOF Always call sizeof() when allocating memory with malloc INCORRECT.ALLOC_SIZE Incorrect Allocation Size |
C-MEM-001 |
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 |
C-MEM-002 |
MLK.MIGHT Memory Leak - possible MLK.MUST Memory Leak MLK.RET.MIGHT Memory Leak - possible MLK.RET.MUST Memory Leak |
C-MEM-003 |
MISRA.INCOMPLETE.STRUCT Incomplete struct type is used MISRA.MEMB.FLEX_ARRAY.2012 Flexible array member shall not be declared |
C-MEM-004 |
MLK.MIGHT Memory Leak - possible MLK.MUST Memory Leak MLK.RET.MIGHT Memory Leak - possible MLK.RET.MUST Memory Leak |
C-MEM-005 |
CWARN.MEMSET.SIZEOF.PTR Memset-like function is called for 'sizeof' applied to pointer INCORRECT.ALLOC_SIZE Incorrect Allocation Size |
C-MEM-006 |
CXX.REALLOC Use of realloc() should be avoided |
C-MEM-007 |
CXX.REALLOC Use of realloc() should be avoided |
C-MSC-003 |
CERT.MSC.STD_RAND_CALL Do not use std::rand() for generating pseudorandom numbers |
C-MSC-004 |
CERT.MSC.SEED_RANDOM Properly seed pseudorandom number generators |
C-MSC-005 |
CERT.MSC.ASCTIME Do not pass invalid data to the asctime() function |
C-MSC-006 |
FUNCRET.GEN Non-void function does not return value MISRA.RETURN.NOT_LAST Return is not the last statement in a function |
C-MSC-008 |
VA.LIST.INDETERMINATE Attempt to call va_arg() on a va_list that has an indeterminate value |
C-MSC-010 |
CXX.GETLOGIN Do not use getlogin in multithreaded applications |
C-MSC-013 |
RCA.HASH.SALT.EMPTY Use of a one-way hash with an empty salt |
C-MSC-014 |
SV.WEAK_CRYPTO.WEAK_HASH Weak Hash Function |
C-MSC-015 |
CERT.MSC.SEED_RANDOM Properly seed pseudorandom number generators |
C-POS-001 |
ABV.GENERAL Buffer Overflow - Array Index Out of Bounds |
C-POS-002 |
CXX.POSIX.VFORK Do not use vfork() |
C-POS-003 |
CXX.PUTENV.LOCAL.PTR Do not pass a pointer to a local variable in the putenv() |
C-POS-005 |
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 |
C-POS-006 |
MISRA.INCL.SIGNAL.2012 The standard header file signal.h shall not be used |
C-POS-008 |
SV.RVT.RETVAL_NOTTESTED Ignored Return Value |
C-POS-009 |
CONC.DBL_LOCK Double Lock CONC.DBL_UNLOCK Double Unlock CONC.DL Deadlock CONC.NO_UNLOCK Missing unlock for variable SV.INCORRECT_RESOURCE_HANDLING.URH Insecure Resource Handling SV.INCORRECT_RESOURCE_HANDLING.WRONG_STATUS Insecure Resource Handling SV.RVT.RETVAL_NOTTESTED Ignored Return Value |
C-POS-011 |
MISRA.IF.NO_COMPOUND The body of if/else statement is not a compound statement |
C-POS-012 |
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.STMT.NO_EFFECT The statement has no side effects, and does not change control flow 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 |
C-PRE-001 |
MISRA.DEFINE.SHARP # or ## operator in a macro definition |
C-PRE-002 |
PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects |
C-PRE-003 |
MISRA.DEFINE.FUNC Function-like macro definition |
C-STR-001 |
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 |
C-STR-002 |
CWARN.CMPCHR.EOF A 'char' expression compared with EOF constant FNH.MIGHT Freeing Non-Heap Memory - possible FNH.MUST Freeing Non-Heap Memory FREE.INCONSISTENT Inconsistent Freeing of Memory FUM.GEN.MIGHT Freeing Unallocated Memory - possible FUM.GEN.MUST Freeing Unallocated Memory MISRA.CHAR.OPERAND Expression of type 'char' or 'wchar_t' is used as non-character operand MLK.MIGHT Memory Leak - possible MLK.MUST Memory Leak MLK.RET.MIGHT Memory Leak - possible MLK.RET.MUST Memory Leak NNTS.MIGHT Buffer Overflow - Non-null Terminated String NNTS.MUST Buffer Overflow - Non-null Terminated String RH.LEAK Resource leak 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 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 |
C-STR-003 |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL 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.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 RABV.CHECK Suspicious use of index before boundary check RN.INDEX Suspicious use of index before negative check SV.FMT_STR.BAD_SCAN_FORMAT Input format specifier error 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.UNBOUND_STRING_INPUT.CIN Usage of cin for unbounded string input SV.UNBOUND_STRING_INPUT.FUNC Usage of unbounded string input |
C-STR-004 |
AUTOSAR.STDLIB.CCTYPE.UCHAR Arguments to character-handling functions defined in <cctype> shall be representable as an unsigned char |
C-STR-005 |
MISRA.ETYPE.ASSIGN.2012 Assignment to an object of a narrower essential type or a different essential type category |
C-STR-006 |
CXX.MALLOC.WCHAR_LENGTH Use (wsclen()+1*sizeof(wchar_t)) when allocating memory with malloc for wchar_t buffers |