summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-05 16:50:54 -0700
committerJunio C Hamano <junkio@cox.net>2005-08-05 16:50:54 -0700
commit4fa1604f10c4878ae2cfbe4b9419a67d6306bb5d (patch)
treec3c99db4807d90933cff99b3f1fb74dc72d63d25 /connect.c
parentb32e986cd7a2b3ab4227d63657ef439786a82024 (diff)
downloadgit-4fa1604f10c4878ae2cfbe4b9419a67d6306bb5d.tar.gz
Fix refname termination.
When a new ref is being pushed, the name of it was not terminated properly. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/connect.c b/connect.c
index a20af1ce0c..3953a1af3d 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);