GitHub
CERT Secure Coding

CodeSonar

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: 9.1p0

CheckerGuideline
ALLOC.DFMEM51-CPP. Properly deallocate dynamically allocated resources
ALLOC.DFOOP54-CPP. Gracefully handle self-copy assignment
ALLOC.LEAKMEM51-CPP. Properly deallocate dynamically allocated resources
ALLOC.LEAKFIO51-CPP. Close files when they are no longer needed
ALLOC.LEAKERR56-CPP. Guarantee exception safety
ALLOC.LEAKERR57-CPP. Do not leak resources when handling exceptions
ALLOC.LEAKOOP54-CPP. Gracefully handle self-copy assignment
ALLOC.TMEXP51-CPP. Do not delete an array through a pointer of the incorrect type
ALLOC.TMMEM51-CPP. Properly deallocate dynamically allocated resources
ALLOC.UAFEXP54-CPP. Do not access an object outside of its lifetime
ALLOC.UAFCTR51-CPP. Use valid references, pointers, and iterators to reference elements of a container
ALLOC.UAFSTR52-CPP. Use valid references, pointers, and iterators to reference elements of a basic_string
ALLOC.UAFMEM50-CPP. Do not access freed memory
ALLOC.UAFOOP54-CPP. Gracefully handle self-copy assignment
BADFUNC.ABORTERR50-CPP. Do not abruptly terminate the program
BADFUNC.ATOFERR62-CPP. Detect errors when converting a string to a number
BADFUNC.ATOIERR62-CPP. Detect errors when converting a string to a number
BADFUNC.ATOLERR62-CPP. Detect errors when converting a string to a number
BADFUNC.ATOLLERR62-CPP. Detect errors when converting a string to a number
BADFUNC.BO.*CTR52-CPP. Guarantee that library functions do not overflow
BADFUNC.EXITERR50-CPP. Do not abruptly terminate the program
BADFUNC.LONGJMPERR52-CPP. Do not use setjmp() or longjmp()
BADFUNC.MEMCMPEXP62-CPP. Do not access the bits of an object representation that are not part of the object's value representation
BADFUNC.MEMCMPOOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions
BADFUNC.MEMSETEXP62-CPP. Do not access the bits of an object representation that are not part of the object's value representation
BADFUNC.MEMSETOOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions
BADFUNC.RANDOM.RANDMSC50-CPP. Do not use std::rand() for generating pseudorandom numbers
BADFUNC.SETJMPERR52-CPP. Do not use setjmp() or longjmp()
BADMACRO.OFFSETOFEXP59-CPP. Use offsetof() on valid types and members
BADMACRO.STDARG_HEXP58-CPP. Pass an object of the correct type to va_start
CONCURRENCY.BADFUNC.CNDSIGNALCON55-CPP. Preserve thread safety and liveness when using condition variables
CONCURRENCY.BADFUNC.CNDWAITCON54-CPP. Wrap functions that can spuriously wake up in a loop
CONCURRENCY.DATARACECON52-CPP. Prevent data races when accessing bit-fields from multiple threads
CONCURRENCY.LOCALARGCON50-CPP. Do not destroy a mutex while it is locked
CONCURRENCY.LOCK.NOUNLOCKCON51-CPP. Ensure actively held locks are released on exceptional conditions
CONCURRENCY.LOCK.ORDERCON53-CPP. Avoid deadlock by locking in a predefined order
CONCURRENCY.TLCON56-CPP. Do not speculatively lock a non-recursive mutex that is already owned by the calling thread
HARDCODED.SEEDMSC51-CPP. Ensure your random number generator is properly seeded
IO.DCOOP54-CPP. Gracefully handle self-copy assignment
IO.IOWOPFIO50-CPP. Do not alternately input and output from a file stream without an intervening positioning call
IO.OIWOPFIO50-CPP. Do not alternately input and output from a file stream without an intervening positioning call
IO.UACEXP54-CPP. Do not access an object outside of its lifetime
IO.UACOOP54-CPP. Gracefully handle self-copy assignment
LANG.CAST.COERCEINT50-CPP. Do not cast to an out-of-range enumeration value
LANG.CAST.OBJSLICEOOP51-CPP. Do not slice derived objects
LANG.CAST.PC.INCEXP57-CPP. Do not cast or delete pointers to incomplete classes
LANG.CAST.VALUEINT50-CPP. Do not cast to an out-of-range enumeration value
LANG.FUNCS.COPINCOOP58-CPP. Copy operations must not mutate the source object
LANG.ID.NU.MKDCL51-CPP. Do not declare or define a reserved identifier
LANG.MEM.BOCTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.BOCTR52-CPP. Guarantee that library functions do not overflow
LANG.MEM.BOCTR53-CPP. Use valid iterator ranges
LANG.MEM.BOSTR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
LANG.MEM.BOSTR53-CPP. Range check element access
LANG.MEM.BOMEM54-CPP. Provide placement new with properly aligned pointers to sufficient storage capacity
LANG.MEM.BUCTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.BUSTR53-CPP. Range check element access
LANG.MEM.NPDEXP63-CPP. Do not rely on the value of a moved-from object
LANG.MEM.NPDSTR51-CPP. Do not attempt to create a std::string from a null pointer
LANG.MEM.NPDOOP54-CPP. Gracefully handle self-copy assignment
LANG.MEM.TBACTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.TBACTR52-CPP. Guarantee that library functions do not overflow
LANG.MEM.TBASTR53-CPP. Range check element access
LANG.MEM.TOCTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.TOSTR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
LANG.MEM.TOSTR53-CPP. Range check element access
LANG.MEM.TUCTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.MEM.TUSTR53-CPP. Range check element access
LANG.MEM.UVAREXP53-CPP. Do not read uninitialized memory
LANG.MEM.UVAREXP63-CPP. Do not rely on the value of a moved-from object
LANG.MEM.UVAROOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
LANG.PREPROC.INCL.SETJMP_HERR52-CPP. Do not use setjmp() or longjmp()
LANG.STRUCT.CUPCTR54-CPP. Do not subtract iterators that do not refer to the same container
LANG.STRUCT.DECL.ANHDCL59-CPP. Do not define an unnamed namespace in a header file
LANG.STRUCT.DECL.FNESTDCL53-CPP. Do not write syntactically ambiguous declarations
LANG.STRUCT.DECL.RESERVEDDCL51-CPP. Do not declare or define a reserved identifier
LANG.STRUCT.DECL.SNMDCL58-CPP. Do not modify the standard namespaces
LANG.STRUCT.DEF.FDHDCL60-CPP. Obey the one-definition rule
LANG.STRUCT.DEF.ODHDCL60-CPP. Obey the one-definition rule
LANG.STRUCT.DNVDOOP52-CPP. Do not delete a polymorphic object without a virtual destructor
LANG.STRUCT.ELLIPSISDCL50-CPP. Do not define a C-style variadic function
LANG.STRUCT.EXCP.CATCHDCL57-CPP. Do not let exceptions escape from destructors or deallocation functions
LANG.STRUCT.EXCP.CATCHERR61-CPP. Catch exceptions by lvalue reference
LANG.STRUCT.EXCP.THROWDCL57-CPP. Do not let exceptions escape from destructors or deallocation functions
LANG.STRUCT.EXCP.THROWERR55-CPP. Honor exception specifications
LANG.STRUCT.EXCP.THROWERR58-CPP. Handle all exceptions thrown before main() begins executing
LANG.STRUCT.EXCP.THROWERR61-CPP. Catch exceptions by lvalue reference
LANG.STRUCT.ICOLCON54-CPP. Wrap functions that can spuriously wake up in a loop
LANG.STRUCT.INIT.CYCLEDCL56-CPP. Avoid cycles during initialization of static objects
LANG.STRUCT.INIT.OOMIOOP53-CPP. Write constructor member initializers in the canonical order
LANG.STRUCT.INIT.UNORDEREDDCL56-CPP. Avoid cycles during initialization of static objects
LANG.STRUCT.MRSMSC52-CPP. Value-returning functions must return a value from all exit paths
LANG.STRUCT.NVNRMSC52-CPP. Value-returning functions must return a value from all exit paths
LANG.STRUCT.PARITHCTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.STRUCT.PARITHCTR56-CPP. Do not use pointer arithmetic on polymorphic objects
LANG.STRUCT.PBBCTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.STRUCT.PPECTR50-CPP. Guarantee that container indices and iterators are within the valid range
LANG.STRUCT.RCOOP54-CPP. Gracefully handle self-copy assignment
LANG.STRUCT.RFNRMSC53-CPP. Do not return from a function declared [[noreturn]]
LANG.STRUCT.RPLEXP53-CPP. Do not read uninitialized memory
LANG.STRUCT.SE.DECEXP50-CPP. Do not depend on the order of evaluation for side effects
LANG.STRUCT.SE.INCEXP50-CPP. Do not depend on the order of evaluation for side effects
LANG.STRUCT.SE.SIZEOFEXP52-CPP. Do not rely on side effects in unevaluated operands
LANG.STRUCT.SUPCTR54-CPP. Do not subtract iterators that do not refer to the same container
LANG.STRUCT.UCTCHERR51-CPP. Handle all exceptions
LANG.STRUCT.UCTCHERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
LANG.STRUCT.VCALL_IN_CTOROOP50-CPP. Do not invoke virtual functions from constructors or destructors
LANG.STRUCT.VCALL_IN_DTOROOP50-CPP. Do not invoke virtual functions from constructors or destructors
MISC.CRYPTO.TIMESEEDMSC51-CPP. Ensure your random number generator is properly seeded
MISC.MEM.NTERMSTR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
MISC.PADDING.POTBDCL55-CPP. Avoid information leakage when passing a class object across a trust boundary
PARSE.DOICEXP57-CPP. Do not cast or delete pointers to incomplete classes
PARSE.MBDHERR51-CPP. Handle all exceptions