summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:14:59 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:14:59 +0900
commit4f2ce038374e43e25df7a0cc79dd205cf9541814 (patch)
treea7ace95a298dcea304455fc03a1bd05316658c37 /connect.c
parent82784a5370b0993948b35ce3a699f8bb95422af2 (diff)
downloadgit-4f2ce038374e43e25df7a0cc79dd205cf9541814.tar.gz
git-4f2ce038374e43e25df7a0cc79dd205cf9541814.tar.bz2
git-4f2ce038374e43e25df7a0cc79dd205cf9541814.zip
Imported Upstream version 2.3.7upstream/2.3.7
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 ce0e1214..14c924b0 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;
}
}
}