mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
[ 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:
parent
c9947250f2
commit
c2ff18a157
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user