summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-04-20 15:28:33 -0700
committerJunio C Hamano <gitster@pobox.com>2015-04-20 15:28:33 -0700
commit9718c7c0c2a92585729d0f2e05ebf2c44b0cc56a (patch)
treed9c7e5dd4ef241b12469e1a80854b5a4d663f65e /connect.c
parenta59ac46ba4473a6ceed919fefd054c38081531dd (diff)
parent6b6c5f7a2f66751a93afce54277a1f30ab0dc521 (diff)
downloadgit-9718c7c0c2a92585729d0f2e05ebf2c44b0cc56a.tar.gz
Merge branch 'tb/connect-ipv6-parse-fix'
An earlier update to the parser that disects an address broke an address, followed by a colon, followed by an empty string (instead of the port number). * tb/connect-ipv6-parse-fix: connect.c: ignore extra colon after hostname
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/connect.c b/connect.c
index 6090211fe9..391d21192f 100644
--- a/connect.c
+++ b/connect.c
@@ -310,6 +310,8 @@ static void get_host_and_port(char **host, const char **port)
if (end != colon + 1 && *end == '\0' && 0 <= portnr && portnr < 65536) {
*colon = 0;
*port = colon + 1;
+ } else if (!colon[1]) {
+ *colon = 0;
}
}
}