Skip to content

Commit b10b918

Browse files
committed
Merge branch 'maint'
* maint: fix memcpy of overlapping area
2 parents 947c346 + 3325cea commit b10b918

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)