Bug #1992
seg fault on parsing malformed mod_expires param
| Status: | Fixed | Start date: | 2009-05-28 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 100% | |
| Category: | mod_expire | |||
| Target version: | 1.4.23 | |||
| Missing in 1.5.x: |
Description
I mistakenly added a mod_expire rule, using the incorrect keyword of 'year', instead of 'years'
Lighty fails to start, but outputs nothing to either screen or error log.
Icy talked me through this on IRC, and so here is gdb output he asked me to attach
/etc/lighttpd/lighttpd.conf (with mod_expire loaded)
-------------------------------------------------------------------
$HTTP["url"] =~ "^/js/" { expire.url = ("" => "access 1 year") }
Passing -D to lighty, results in "Segmentation fault"
Output from gdb...
--------------------
Starting program: /usr/local/sbin/lighttpd -Df /etc/lighttpd/lighttpd.conf
Program received signal SIGSEGV, Segmentation fault.
mod_expire_free (srv=0x92f2008, p_d=0x9305c50) at mod_expire.c:66
66 array_free(s->expire_url);
Cause
------------
"access 1 year" in config, should be "access 1 years"
Additionally, it seems any invalid param in expire url, causes a segfault
Expected Result
----------------
Parse error when loading config
Associated revisions
Fix segfault in mod_expire after failed config parsing (fixes #1992)
Fix segfault in mod_expire after failed config parsing (fixes #1992)
History
#1 Updated by stbuehler almost 4 years ago
- Target version changed from 1.4.22 to 1.4.23
Affected version != target version.
#2 Updated by stbuehler almost 4 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2517.
Also available in: Atom