]> asedeno.scripts.mit.edu Git - git.git/commitdiff
Merge branch 'tr/receive-pack-aliased-update-fix'
authorJunio C Hamano <gitster@pobox.com>
Mon, 21 Jun 2010 13:02:46 +0000 (06:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Jun 2010 13:02:46 +0000 (06:02 -0700)
* tr/receive-pack-aliased-update-fix:
  check_aliased_update: strcpy() instead of strcat() to copy

1  2 
builtin/receive-pack.c

diff --combined builtin/receive-pack.c
index 5a75af415562b6f8f60c9d89ba6042888211170d,7e4129ddc85e1408300947ff9c041524a1c10f48..29bc8d50bbe187654e8b0903627655fbb05a6aea
@@@ -17,7 -17,7 +17,7 @@@ enum deny_action 
        DENY_UNCONFIGURED,
        DENY_IGNORE,
        DENY_WARN,
 -      DENY_REFUSE,
 +      DENY_REFUSE
  };
  
  static int deny_deletes;
@@@ -515,9 -515,9 +515,9 @@@ static void check_aliased_update(struc
        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,