From 4fa1604f10c4878ae2cfbe4b9419a67d6306bb5d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 5 Aug 2005 16:50:54 -0700 Subject: [PATCH] Fix refname termination. When a new ref is being pushed, the name of it was not terminated properly. Signed-off-by: Junio C Hamano --- connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connect.c b/connect.c index a20af1ce0..3953a1af3 100644 --- a/connect.c +++ b/connect.c @@ -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); -- 2.26.2