memcpy and memmove

The patch from the Intel guys has exposed the bugs in code where developers ignored the requirement that the source and destination arrays passed to memcpy() cannot overlap.

It seems like a good time to remind you the difference between memcpy() and memmove(), don't fail like Adobe did.

  1. The memcpy() function copies n bytes from memory area src to memory area dest. The memory areas should not overlap.

  2. The memmove() function copies n bytes from memory area src to memory area dest. The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.