Problem: vim_strcat() cannot handle overlapping arguments.
Solution: Use mch_memmove() instead of strcpy(). (Justin M Keyes,
closes #1415)
/*
* Like strcat(), but make sure the result fits in "tosize" bytes and is
- * always NUL terminated.
+ * always NUL terminated. "from" and "to" may overlap.
*/
void
vim_strcat(char_u *to, char_u *from, size_t tosize)
to[tosize - 1] = NUL;
}
else
- STRCPY(to + tolen, from);
+ mch_memmove(to + tolen, from, fromlen + 1);
}
/*
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 248,
/**/
247,
/**/