On Tuesday 30 April 2013, Martin Mikkelsen wrote:
This smells memory corruption. When run under
valgrind, valgrind
generates this error when that code is run:
==1206== Source and destination overlap in strncpy(0x55e3b2a, 0x55e3b2b,
10) ==1206== at 0x4C25ACF: strncpy (mc_replace_strmem.c:339)
strncpy() must be replaced with memmove() when src and dst (may) overlap.
--
Alex Hermann