[ darkhttpd-1.4 release ]

Fix a segfault in log_connection() that happens when the incoming
request is too long.

(Forgot to bump the version)
This commit is contained in:
Emil Mikulic 2006-09-04 07:04:39 +00:00
parent c9947250f2
commit c2ff18a157

View File

@ -2177,8 +2177,12 @@ static void log_connection(const struct connection *conn)
{
struct in_addr inaddr;
if (logfile == NULL) return;
if (conn->http_code == 0) return; /* invalid - died in request */
if (logfile == NULL)
return;
if (conn->http_code == 0)
return; /* invalid - died in request */
if (conn->method == NULL)
return; /* invalid - didn't parse - maybe too long */
/* Separated by tabs:
* time client_ip method uri http_code bytes_sent "referer" "user-agent"