From 60cb1d10b3eb0e7966be1c40501524dc10e4c512 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Sat, 5 Mar 2011 13:56:14 +0200 Subject: [PATCH] Use memmove() in git__joinpath for overlapping copies Signed-off-by: Vicent Marti --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 2f1bd2220..d23ae4c3f 100644 --- a/src/util.c +++ b/src/util.c @@ -221,7 +221,7 @@ void git__joinpath_n(char *buffer_out, int count, ...) continue; len = strlen(path); - memcpy(buffer_out, path, len); + memmove(buffer_out, path, len); buffer_out = buffer_out + len; if (i < count - 1 && buffer_out[-1] != '/')