Skip to content

Commit

Permalink
Fix refname termination.
Browse files Browse the repository at this point in the history
When a new ref is being pushed, the name of it was not
terminated properly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Aug 5, 2005
1 parent b32e986 commit 4fa1604
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static int match_explicit_refs(struct ref *src, struct ref *dst,
/* pushing "master:master" when
* remote does not have master yet.
*/
int len = strlen(matched_src->name);
int len = strlen(matched_src->name) + 1;
matched_dst = xcalloc(1, sizeof(*dst) + len);
memcpy(matched_dst->name, matched_src->name,
len);
Expand Down

0 comments on commit 4fa1604

Please sign in to comment.