Skip to content

Commit 7223dca

Browse files
committed
Merge branch 'tr/receive-pack-aliased-update-fix' into js/maint-receive-pack-symref-alias
* tr/receive-pack-aliased-update-fix: check_aliased_update: strcpy() instead of strcat() to copy
2 parents d4785cd + 0e71bc3 commit 7223dca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

builtin-receive-pack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,9 @@ static void check_aliased_update(struct command *cmd, struct string_list *list)
515515
dst_cmd->skip_update = 1;
516516

517517
strcpy(cmd_oldh, find_unique_abbrev(cmd->old_sha1, DEFAULT_ABBREV));
518-
strcat(cmd_newh, find_unique_abbrev(cmd->new_sha1, DEFAULT_ABBREV));
518+
strcpy(cmd_newh, find_unique_abbrev(cmd->new_sha1, DEFAULT_ABBREV));
519519
strcpy(dst_oldh, find_unique_abbrev(dst_cmd->old_sha1, DEFAULT_ABBREV));
520-
strcat(dst_newh, find_unique_abbrev(dst_cmd->new_sha1, DEFAULT_ABBREV));
520+
strcpy(dst_newh, find_unique_abbrev(dst_cmd->new_sha1, DEFAULT_ABBREV));
521521
rp_error("refusing inconsistent update between symref '%s' (%s..%s) and"
522522
" its target '%s' (%s..%s)",
523523
cmd->ref_name, cmd_oldh, cmd_newh,

0 commit comments

Comments
 (0)