Browse Source

Merge branch 'maint-1.6.5' into maint

* maint-1.6.5:
  fix memcpy of overlapping area
maint
Junio C Hamano 15 years ago
parent
commit
3325cea0f7
  1. 2
      commit.c

2
commit.c

@ -224,7 +224,7 @@ int unregister_shallow(const unsigned char *sha1) @@ -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--;

Loading…
Cancel
Save