10

Use memcpy with Care!
Use memmove for
Overlapping Memory
Buffers.

#SecureCoding #C/C++
Be careful when moving around data in a buffer with memcpy: If the regions overlap, the result is undefined. This has been a source of significant bugs in the past. We recommend to use memmove for potentially overlapping regions of memory instead.
Icon with a waving hand

Get in touch

sigma star gmbh
Eduard-Bodem-Gasse 6, 1st floor
6020 Innsbruck | Austria

sigma star gmbh logo