Skip to content

Commit 3325cea

Browse files
committed
Merge branch 'maint-1.6.5' into maint
* maint-1.6.5: fix memcpy of overlapping area
2 parents 63d04a7 + 65d41d4 commit 3325cea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ int unregister_shallow(const unsigned char *sha1)
224224
if (pos < 0)
225225
return -1;
226226
if (pos + 1 < commit_graft_nr)
227-
memcpy(commit_graft + pos, commit_graft + pos + 1,
227+
memmove(commit_graft + pos, commit_graft + pos + 1,
228228
sizeof(struct commit_graft *)
229229
* (commit_graft_nr - pos - 1));
230230
commit_graft_nr--;

0 commit comments

Comments
 (0)