From 204c44be9ef7b7313b95033f4a0e7a538aefcc63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 18 Jun 2007 19:45:53 +0000 Subject: [PATCH] (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 --- lib/sl/sl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sl/sl.c b/lib/sl/sl.c index fdf438bd2..dbd4e5edc 100644 --- a/lib/sl/sl.c +++ b/lib/sl/sl.c @@ -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)) {