X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=commit.c;h=731191e63bd39a89a8ea4ed0390c49d5605cdbed;hb=3c651491f28e01a9ee0ddaecd05fb7a211d218c3;hp=632061c2c3669991b6526a5b6b452e3b54ee718c;hpb=fc4b10cd2dd4f23443d1c639b9c38a604fff3aa3;p=git.git 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--;