aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-29 23:36:13 -0800
committerJunio C Hamano <gitster@pobox.com>2010-01-29 23:36:13 -0800
commit3325cea0f7ef7355f6806b2fc88acdb2e27785ac (patch)
treed2c4340526affe6177de3004e47fc3418e1d1bf3
parent63d04a78043c61c52ae437fa6106e7029b466bbf (diff)
parent65d41d48a4e4e795d64dd7842a44d693b741bf31 (diff)
downloadgit-3325cea0f7ef7355f6806b2fc88acdb2e27785ac.tar.gz
git-3325cea0f7ef7355f6806b2fc88acdb2e27785ac.tar.xz
Merge branch 'maint-1.6.5' into maint
* maint-1.6.5: fix memcpy of overlapping area
-rw-r--r--commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commit.c b/commit.c
index 632061c2c..731191e63 100644
--- a/commit.c
+++ b/commit.c
@@ -224,7 +224,7 @@ int unregister_shallow(const unsigned char *sha1)
if (pos < 0)
return -1;
if (pos + 1 < commit_graft_nr)
- memcpy(commit_graft + pos, commit_graft + pos + 1,
+ memmove(commit_graft + pos, commit_graft + pos + 1,
sizeof(struct commit_graft *)
* (commit_graft_nr - pos - 1));
commit_graft_nr--;