Use memmove() not memcpy() to slide some pointers down.
The previous coding here was formally undefined, though it seems to accidentally work on most platforms in the buildfarm. Caught by some OpenBSD platforms in which libc contains an assertion check for overlapping areas passed to memcpy(). Thomas Munro
Showing
Please register or sign in to comment