summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67aef03)
raw | patch | inline | side by side (parent: 67aef03)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 24 Oct 2006 01:26:05 +0000 (18:26 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 24 Oct 2006 01:26:05 +0000 (18:26 -0700) |
In the older times, the clients did not say which host they were trying
to connect, and the code we recently added did not quite handle the
older clients correctly.
Noticed by Simon Arlott.
Signed-off-by: Junio C Hamano <junkio@cox.net>
to connect, and the code we recently added did not quite handle the
older clients correctly.
Noticed by Simon Arlott.
Signed-off-by: Junio C Hamano <junkio@cox.net>
daemon.c | patch | blob | history |
diff --git a/daemon.c b/daemon.c
index ad8492873ea1db63d56c24bec6174c4682105433..e66bb802da9faed6e01229fffbe56e3d7cca60c6 100644 (file)
--- a/daemon.c
+++ b/daemon.c
* Replace literal host with lowercase-ized hostname.
*/
hp = interp_table[INTERP_SLOT_HOST].value;
+ if (!hp)
+ return;
for ( ; *hp; hp++)
*hp = tolower(*hp);
loginfo("Extended attributes (%d bytes) exist <%.*s>",
(int) pktlen - len,
(int) pktlen - len, line + len + 1);
- if (len && line[len-1] == '\n')
+ if (len && line[len-1] == '\n') {
line[--len] = 0;
+ pktlen--;
+ }
/*
* Initialize the path interpolation table for this connection.