summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-30 07:36:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-30 07:36:17 (GMT)
commitb10b9184afc9e62140d307dcf2f5d7e625f78c79 (patch)
tree2fd5fc724b38040a9fe198d19e815f2a7080e380
parent947c3464e49522c55296a8191aed7946bd0f4308 (diff)
parent3325cea0f7ef7355f6806b2fc88acdb2e27785ac (diff)
downloadgit-b10b9184afc9e62140d307dcf2f5d7e625f78c79.zip
git-b10b9184afc9e62140d307dcf2f5d7e625f78c79.tar.gz
git-b10b9184afc9e62140d307dcf2f5d7e625f78c79.tar.bz2
Merge branch 'maint'
* maint: 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 632061c..731191e 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--;