LWN.net Logo

Glibc change exposing bugs

Glibc change exposing bugs

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]


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds