daemon: parse_host_and_port SIGSEGV if port is specified
[gitweb.git] / daemon.c
index 3769b6f570f20ed320fd5345281a5577c80d0a58..7d9e1c03e88d7785f4ff0d534563ba5778fbc244 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -420,7 +420,7 @@ static void parse_host_and_port(char *hostport, char **host,
                *host = hostport;
                *port = strrchr(hostport, ':');
                if (*port) {
-                       *port = '\0';
+                       **port = '\0';
                        ++*port;
                }
        }