facebook pixelCodiga Analysis C / C++ Rules, category security
BACK TO LIST

C / C++ rules

C and C++ are really performant languages and can be very error-prone. We all had core dumps and made pointer arithmetic errors! Thankfully, Codiga has hundreds of static analysis rules to flag potential errors in your C/C++ code, automate code reviews and merge with confidence.

assignBoolToPointer

Security
Critical

Boolean value assigned to pointer.

AssignmentIntegerToAddress

Security
Warning

Assigning an integer to a pointer is not portable.

invalidFunctionArgBool

Security
Critical

Invalid boolean argument

memsetValueOutOfRange

Security
Error

Invalid memset assignment

publicAllocationError

Security
Error

Possible leak in public function.

returnTempReference

Security
Critical

Reference to temporary returned.

selfInitialization

Security
Critical

Member variable is initialized by itself.

signConversionCond

Security
Error

Conversion between unsigned and signed values

uninitdata

Security
Critical

Memory is allocated but not initialized

uninitStructMember

Security
Critical

Uninitialized struct member

unsafeClassCanLeak

Security
Informational

Class is unsafe

pointerOutOfBoundsCond

Security
Error

Undefined behaviour, when 'len' is 4 the pointer arithmetic 'cmd+len' is out of bounds

argumentSize

Security
Error

Buffer is too small