Contenu principal

Défauts de mémoire statique

Défauts concernant les erreurs de codage de la mémoire statique, les tableaux hors limites, les pointeurs nuls, la mémoire standard et la bibliothèque de chaînes de caractères

Ces défauts sont des erreurs liées à l'utilisation de la mémoire lorsque celle-ci est allouée de manière statique. Ces défauts incluent :

  • Accès aux tableaux hors limites

  • Pointeurs nuls

  • Regroupement de pointeurs

Résultats Polyspace

Arithmetic operation with NULL pointerArithmetic operation performed on NULL pointer
Array access out of boundsArray index outside bounds during array access
Buffer overflow from incorrect string format specifierString format specifier causes buffer argument of standard library functions to overflow
Destination buffer overflow in string manipulationFunction writes to buffer at offset greater than buffer size
Destination buffer underflow in string manipulationFunction writes to buffer at a negative offset from beginning of buffer
Invalid use of standard library memory routineStandard library memory function called with invalid arguments
Invalid use of standard library string routineStandard library string function called with invalid arguments
Move operation on const objectstd::move function is called with object declared const or const&
Null pointerNULL pointer dereferenced
Pointer access out of boundsPointer dereferenced outside its bounds
Pointer or reference to stack variable leaving scopePointer to local variable leaves the variable scope
Subtraction or comparison between pointers to different arraysSubtraction or comparison between pointers causes undefined behavior
Unreliable cast of function pointerFunction pointer cast to another function pointer with different argument or return type
Unreliable cast of pointerPointer implicitly cast to different data type
Use of automatic variable as putenv-family function argumentputenv-family function argument not accessible outside its scope
Use of path manipulation function without maximum sized buffer checkingDestination buffer of getwd or realpath is smaller than PATH_MAX bytes
Wrong allocated object size for castAllocated memory does not match destination pointer

Rubriques

  • Bug Finder Defect Groups

    The Bug Finder defect checkers are classified into groups such as data flow, concurrency, numerical, and so on.