https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412009-02-15T20:30:38Zlighty labsLighttpd - Bug #1900: wrong format when long request sizehttps://redmine.lighttpd.net/issues/1900?journal_id=54252009-02-15T20:30:38Zstepanchegyozh@mx1.ru
<ul></ul><pre>
diff -r 48f3f2b6cb81 src/request.c
--- a/src/request.c Sun Feb 15 16:52:40 2009 +0300
+++ b/src/request.c Sun Feb 15 23:24:29 2009 +0300
@@ -656,7 +656,7 @@
con->http_status = 413;
con->keep_alive = 0;
- log_error_write(srv, __FILE__, __LINE__, "sds",
+ log_error_write(srv, __FILE__, __LINE__, "sos",
"request-size too long:", con->request.content_length, "-> 413");
return 0;
}
</pre> Lighttpd - Bug #1900: wrong format when long request sizehttps://redmine.lighttpd.net/issues/1900?journal_id=54262009-02-15T21:20:56Zstbuehler
<ul></ul><p>Yes, this looks like a bug. But I couldn't reproduce any segfault or wrong error message with 1.5 or 1.4 on 32-bit and 64-bit hosts.</p>
<p>Do you have a backtrace/real examples?</p> Lighttpd - Bug #1900: wrong format when long request sizehttps://redmine.lighttpd.net/issues/1900?journal_id=54272009-02-15T21:30:09Zstepanchegyozh@mx1.ru
<ul></ul><p>I haven't tried to reproduce SEGV, but I reproduced wrong message. Before patch it was:</p>
<p>2009-02-15 23:01:42: (request.c.659) request-size too long: 1467124824</p>
<p>after patch:</p>
<p>2009-02-15 23:56:25: (request.c.659) request-size too long: 1467124801 -> 413</p>
<p>What is sizeof(long) on your 32-bit host? It must be 32 to reproduce problem.</p> Lighttpd - Bug #1900: wrong format when long request sizehttps://redmine.lighttpd.net/issues/1900?journal_id=54282009-02-15T22:07:11Zstepanchegyozh@mx1.ru
<ul></ul><p>I was wrong about SEGV:</p>
<pre>
if (r > SSIZE_MAX) {
con->http_status = 413;
ERROR("request-size too long: %s (Status: 413)", SAFE_BUF_STR(ds->value));
return 0;
}
</pre>
<p>checked before. Real problem only in diag message.</p> Lighttpd - Bug #1900: wrong format when long request sizehttps://redmine.lighttpd.net/issues/1900?journal_id=54302009-02-15T22:10:55Zstbuehler
<ul><li><strong>Subject</strong> changed from <i>wrong format when long request size (SEGV)</i> to <i>wrong format when long request size</i></li></ul> Lighttpd - Bug #1900: wrong format when long request sizehttps://redmine.lighttpd.net/issues/1900?journal_id=54342009-02-16T13:55:06Zstbuehler
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Fixed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset r2395.</p>