Checker | Guideline |
---|
(custom) | CON00-CPP. Avoid assuming functions are thread safe unless otherwise specified |
(customization) | FIO06-CPP. Create files with appropriate access permissions |
(customization) | INT06-CPP. Use strtol() or a related function to convert a string token to an integer |
(general) | INT04-CPP. Enforce limits on integer values originating from untrusted sources |
ALLOC.LEAK | FIO51-CPP. Close files when they are no longer needed |
ALLOC.LEAK | ERR57-CPP. Do not leak resources when handling exceptions |
ALLOC.LEAK | MEM12-CPP. Do not assume infinite heap space |
ALLOC.SIZE.ADDOFLOW | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
ALLOC.SIZE.IOFLOW | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
ALLOC.SIZE.MULOFLOW | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
ALLOC.SIZE.MULOFLOW | MEM07-CPP. Ensure that the arguments to calloc(), when multiplied, can be represented as a size_t |
ALLOC.SIZE.SUBUFLOW | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
ALLOC.SIZE.TRUNC | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
ALLOC.UAF | EXP54-CPP. Do not access an object outside of its lifetime |
ALLOC.UAF | MEM50-CPP. Do not access freed memory |
BADFUNC.ATOF | INT06-CPP. Use strtol() or a related function to convert a string token to an integer |
BADFUNC.ATOI | INT06-CPP. Use strtol() or a related function to convert a string token to an integer |
BADFUNC.ATOL | INT06-CPP. Use strtol() or a related function to convert a string token to an integer |
BADFUNC.ATOLL | INT06-CPP. Use strtol() or a related function to convert a string token to an integer |
BADFUNC.LONGJMP | ERR52-CPP. Do not use setjmp() or longjmp() |
BADFUNC.MEMSET | MSC06-CPP. Be aware of compiler optimization when dealing with sensitive data |
BADFUNC.PATH.SYSTEM | ENV02-CPP. Do not call system() if you do not need a command processor |
BADFUNC.RANDOM.RAND | MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers |
BADFUNC.RANDOM.RAND | CON00-CPP. Avoid assuming functions are thread safe unless otherwise specified |
BADFUNC.SETJMP | ERR52-CPP. Do not use setjmp() or longjmp() |
BADFUNC.SIGNAL | SIG02-CPP. Avoid using signals to implement normal functionality |
BADFUNC.STDIO_H | FIO17-CPP. Prefer streams to C-style input and output |
BADFUNC.TEMP.* | FIO01-CPP. Be careful using functions that use file names for identification |
BADFUNC.TEMP.* | FIO19-CPP. Do not create temporary files in shared directories |
BADFUNC.TTYNAME | CON00-CPP. Avoid assuming functions are thread safe unless otherwise specified |
BADFUNC.WCHAR_H | FIO17-CPP. Prefer streams to C-style input and output |
BUILD.WALL | MSC00-CPP. Compile cleanly at high warning levels |
CONCURRENCY.LOCK.ORDER | CON53-CPP. Avoid deadlock by locking in a predefined order |
IO.INJ.COMMAND | STR02-CPP. Sanitize data passed to complex subsystems |
IO.INJ.FMT | FIO00-CPP. Take care when creating format strings |
IO.INJ.FMT | STR02-CPP. Sanitize data passed to complex subsystems |
IO.INJ.LDAP | STR02-CPP. Sanitize data passed to complex subsystems |
IO.INJ.LIB | STR02-CPP. Sanitize data passed to complex subsystems |
IO.INJ.SQL | STR02-CPP. Sanitize data passed to complex subsystems |
IO.RACE | FIO01-CPP. Be careful using functions that use file names for identification |
IO.TAINT.ADDR | INT04-CPP. Enforce limits on integer values originating from untrusted sources |
IO.TAINT.FNAME | FIO01-CPP. Be careful using functions that use file names for identification |
IO.TAINT.FNAME | FIO02-CPP. Canonicalize path names originating from untrusted sources |
IO.TAINT.SIZE | INT04-CPP. Enforce limits on integer values originating from untrusted sources |
IO.UAC | EXP54-CPP. Do not access an object outside of its lifetime |
LANG.CAST.COERCE | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
LANG.CAST.PC.AV | EXP16-CPP. Avoid conversions using void pointers |
LANG.CAST.PC.AV | INT11-CPP. Take care when converting from pointer to integer or integer to pointer |
LANG.CAST.PC.INC | EXP57-CPP. Do not cast or delete pointers to incomplete classes |
LANG.CAST.PC.INT | INT11-CPP. Take care when converting from pointer to integer or integer to pointer |
LANG.CAST.PC.PV | EXP16-CPP. Avoid conversions using void pointers |
LANG.CAST.RIP | EXP15-CPP. Beware of integer promotion when performing bitwise operations on chars or shorts |
LANG.CAST.VALUE | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
LANG.FUNCS.IRV | ERR10-CPP. Check for error conditions |
LANG.FUNCS.IRV | EXP12-CPP. Do not ignore values returned by functions or methods |
LANG.ID.AMBIG | DCL02-CPP. Use visually distinct identifiers |
LANG.ID.ND.NEST | DCL01-CPP. Do not reuse variable names in subscopes |
LANG.ID.NU.MK | DCL51-CPP. Do not declare or define a reserved identifier |
LANG.MEM.BO | CTR50-CPP. Guarantee that container indices and iterators are within the valid range |
LANG.MEM.BO | STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator |
LANG.MEM.BU | CTR50-CPP. Guarantee that container indices and iterators are within the valid range |
LANG.MEM.TAB | INT04-CPP. Enforce limits on integer values originating from untrusted sources |
LANG.MEM.TBA | CTR50-CPP. Guarantee that container indices and iterators are within the valid range |
LANG.MEM.TO | CTR50-CPP. Guarantee that container indices and iterators are within the valid range |
LANG.MEM.TO | STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator |
LANG.MEM.TU | CTR50-CPP. Guarantee that container indices and iterators are within the valid range |
LANG.MEM.UVAR | EXP53-CPP. Do not read uninitialized memory |
LANG.MEM.UVAR | MEM09-CPP. Do not assume memory allocation routines initialize memory |
LANG.PREPROC.MACROEND | PRE02-CPP. Macro replacement lists should be parenthesized |
LANG.PREPROC.MACROEND | PRE11-CPP. Do not conclude macro definitions with a semicolon |
LANG.PREPROC.MACROSTART | PRE02-CPP. Macro replacement lists should be parenthesized |
LANG.STRUCT.CONDASSIG | EXP19-CPP. Do not perform assignments in conditional expressions |
LANG.STRUCT.DECL.FAM | CTR02-CPP. Explicitly specify array bounds, even if implicitly defined by an initializer |
LANG.STRUCT.DECL.ML | DCL04-CPP. Do not declare more than one variable per declaration |
LANG.STRUCT.DEF.FDH | MSC52-CPP. Obey the one-definition rule |
LANG.STRUCT.DEF.ODH | MSC52-CPP. Obey the one-definition rule |
LANG.STRUCT.EBS | MSC12-CPP. Detect and remove code that has no effect |
LANG.STRUCT.INIT.ENUM | INT09-CPP. Ensure enumeration constants map to unique values |
LANG.STRUCT.MRS | MSC54-CPP. Value-returning functions must return a value from all exit paths |
LANG.STRUCT.PBB | CTR50-CPP. Guarantee that container indices and iterators are within the valid range |
LANG.STRUCT.PPE | CTR50-CPP. Guarantee that container indices and iterators are within the valid range |
LANG.STRUCT.RC | MSC07-CPP. Detect and remove dead code |
LANG.STRUCT.RC | MSC12-CPP. Detect and remove code that has no effect |
LANG.STRUCT.RPL | EXP53-CPP. Do not read uninitialized memory |
LANG.STRUCT.SCOPE.FILE | DCL07-CPP. Minimize the scope of variables and methods |
LANG.STRUCT.SCOPE.LOCAL | DCL07-CPP. Minimize the scope of variables and methods |
LANG.STRUCT.SE.COND | EXP19-CPP. Do not perform assignments in conditional expressions |
LANG.STRUCT.SW.MB | MSC18-CPP. Finish every set of statements associated with a case label with a break statement |
LANG.STRUCT.UA | MSC12-CPP. Detect and remove code that has no effect |
LANG.STRUCT.UC | MSC07-CPP. Detect and remove dead code |
LANG.STRUCT.UC | MSC12-CPP. Detect and remove code that has no effect |
LANG.STRUCT.UPD | MSC08-CPP. Functions should validate their parameters |
LANG.STRUCT.UUVAL | MSC13-CPP. Detect and remove unused values |
LANG.TYPE.AWID | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
LANG.TYPE.BASIC | INT01-CPP. Use rsize_t or size_t for all integer values representing the size of an object |
LANG.TYPE.BFSIGN | INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression |
LANG.TYPE.CSUF | DCL16-CPP. Use "L," not "l," to indicate a long value |
LANG.TYPE.IOT | INT07-CPP. Use only explicitly signed or unsigned char type for numeric values |
LANG.TYPE.IOT | INT13-CPP. Use bitwise operators only on unsigned operands |
LANG.TYPE.MOT | FLP05-CPP. Convert integers to floating point for floating point operations |
LANG.TYPE.NCS | STR05-CPP. Use pointers to const when referring to string literals |
LANG.TYPE.OWID | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
MISC.FMT | FIO00-CPP. Take care when creating format strings |
MISC.MEM.NTERM | STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator |
MISC.MEM.NTERM | STR03-CPP. Do not inadvertently truncate a null-terminated character array |
MISC.MEM.SIZE.ADDOFLOW | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
MISC.MEM.SIZE.BAD | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
MISC.MEM.SIZE.MULOFLOW | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
MISC.MEM.SIZE.SUBUFLOW | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
MISC.MEM.SIZE.TRUNC | INT18-CPP. Evaluate integer expressions in a larger size before comparing or assigning to that size |
MISC.NEGCHAR | INT05-CPP. Do not use input functions to convert character data if they cannot handle all possible inputs |
MISC.NEGCHAR | STR00-CPP. Represent characters using an appropriate type |
MISC.NOEFFECT | MSC12-CPP. Detect and remove code that has no effect |