(sl_make_argv): use memmove since we are dealing with overlapping strings.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21119 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-06-18 19:45:53 +00:00
parent d9f989af5b
commit 204c44be9e

View File

@@ -242,12 +242,12 @@ sl_make_argv(char *line, int *ret_argc, char ***ret_argv)
;
} else if (*p == '"') {
quote = !quote;
strcpy(&p[0], &p[1]);
memmove(&p[0], &p[1], strlen(p[1]);
continue;
} else if (*p == '\\') {
if (p[1] == '\0')
goto failed;
strcpy(&p[0], &p[1]);
memmove(&p[0], &p[1], strlen(p[1]);
p += 2;
continue;
} else if (quote || !isspace((unsigned char)*p)) {