Back

SEC020

Potential buffer overflow

Object Pascal — Delphi & Free Pascal
Error
Security

Move/CopyMemory without SizeOf can overwrite adjacent memory and enable exploits

Move/CopyMemory without SizeOf can overwrite adjacent memory and enable exploits.

Why this severity

Move/CopyMemory without SizeOf can overwrite adjacent memory and enable exploits.


Known false positives

correctly sized buffers where the size is a calculated constant.

Remediation example

Move(Source, Dest, SizeOf(TMyRecord));

Reconnecting… Connection lost. Reload