aboutsummaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-21 06:02:46 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-21 06:02:46 -0700
commitcecff3a45b4660f47a58746eae42b6ddb58e1919 (patch)
tree238031a4e40b0d41a115c8ec00c12f228e33d759 /builtin/receive-pack.c
parent632d3f4b5b80700c6c7c3637d6a4d1d9a457f7e1 (diff)
parent0e71bc300432b9e63bdbc8e28b0c5c0fafb601fc (diff)
downloadgit-cecff3a45b4660f47a58746eae42b6ddb58e1919.tar.gz
git-cecff3a45b4660f47a58746eae42b6ddb58e1919.tar.xz
Merge branch 'tr/receive-pack-aliased-update-fix'
* tr/receive-pack-aliased-update-fix: check_aliased_update: strcpy() instead of strcat() to copy
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 5a75af415..29bc8d50b 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -515,9 +515,9 @@ static void check_aliased_update(struct command *cmd, struct string_list *list)
dst_cmd->skip_update = 1;
strcpy(cmd_oldh, find_unique_abbrev(cmd->old_sha1, DEFAULT_ABBREV));
- strcat(cmd_newh, find_unique_abbrev(cmd->new_sha1, DEFAULT_ABBREV));
+ strcpy(cmd_newh, find_unique_abbrev(cmd->new_sha1, DEFAULT_ABBREV));
strcpy(dst_oldh, find_unique_abbrev(dst_cmd->old_sha1, DEFAULT_ABBREV));
- strcat(dst_newh, find_unique_abbrev(dst_cmd->new_sha1, DEFAULT_ABBREV));
+ strcpy(dst_newh, find_unique_abbrev(dst_cmd->new_sha1, DEFAULT_ABBREV));
rp_error("refusing inconsistent update between symref '%s' (%s..%s) and"
" its target '%s' (%s..%s)",
cmd->ref_name, cmd_oldh, cmd_newh,