Posted Nov 10, 2010 20:45 UTC (Wed) by Rubberman (guest, #70320)
Parent article: Glibc change exposing bugs
It has been published since the beginning of time that one does NOT use memcpy() when source and target overlap, but to use memmove() in such cases. Caveate Programmer! From the memcpy() man page:
[quote]
The memcpy() function copies n bytes from memory area src to memory area dest. The memory areas
should not overlap. Use memmove(3) if the memory areas do overlap.
[/quote]