Skip to content

Commit 8a72864

Browse files
committed
Merge branch 'tr/maint-ident-to-git-memmove'
* tr/maint-ident-to-git-memmove: Use memmove in ident_to_git
2 parents c14bd20 + 7732118 commit 8a72864

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

convert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ static int ident_to_git(const char *path, const char *src, size_t len,
533533
dollar = memchr(src, '$', len);
534534
if (!dollar)
535535
break;
536-
memcpy(dst, src, dollar + 1 - src);
536+
memmove(dst, src, dollar + 1 - src);
537537
dst += dollar + 1 - src;
538538
len -= dollar + 1 - src;
539539
src = dollar + 1;
@@ -553,7 +553,7 @@ static int ident_to_git(const char *path, const char *src, size_t len,
553553
src = dollar + 1;
554554
}
555555
}
556-
memcpy(dst, src, len);
556+
memmove(dst, src, len);
557557
strbuf_setlen(buf, dst + len - buf->buf);
558558
return 1;
559559
}

0 commit comments

Comments
 (0)