diff --git a/src/misc.c b/src/misc.c index 64543cc51..8c54f9c5a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -232,11 +232,7 @@ void splitcn(char *first, char *rest, char divider, size_t max) if (first != NULL) strlcpy(first, rest, max); if (first != rest) - /* In most circumstances, strcpy with src and dst being the same buffer - * can produce undefined results. We're safe here, as the src is - * guaranteed to be at least 2 bytes higher in memory than dest. - */ - strcpy(rest, p + 1); + memmove(rest, p + 1, strlen(p + 1) + 1); } char *splitnick(char **blah)