From: imre.deak@nokia.com
To: git@vger.kernel.org
Cc: Imre Deak <imre.deak@gmail.com>
Subject: [PATCH] daemon: parse_host_and_port SIGSEGV if port is specified
Date: Sat, 20 Mar 2010 04:23:58 +0200 [thread overview]
Message-ID: <1269051838-25734-1-git-send-email-imre.deak@nokia.com> (raw)
From: Imre Deak <imre.deak@gmail.com>
This typo will lead to git-daemon dying any time the connect
string includes a port after the host= attribute. This can lead
for example to one of the following error messages on the client
side when someone tries git clone git://...:<port>.
When the daemon is running on localhost:
fatal: The remote end hung up unexpectedly
or when the daemon is connected through an ssh tunnel:
fatal: protocol error: bad line length character: erro
In the latter case 'erro' comes from the daemon's reply:
error: git-daemon died of signal 11
Signed-off-by: Imre Deak <imre.deak@gmail.com>
---
daemon.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemon.c b/daemon.c
index 3769b6f..7d9e1c0 100644
--- 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;
}
}
--
1.7.0.2
next reply other threads:[~2010-03-20 2:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-20 2:23 imre.deak [this message]
2010-03-20 15:49 ` [PATCH] daemon: parse_host_and_port SIGSEGV if port is specified Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1269051838-25734-1-git-send-email-imre.deak@nokia.com \
--to=imre.deak@nokia.com \
--cc=git@vger.kernel.org \
--cc=imre.deak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).