Project

General

Profile

Bug #1992

seg fault on parsing malformed mod_expires param

Added by carpii about 7 years ago. Updated about 7 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_expire
Target version:
Start date:
2009-05-28
Due date:
% Done:

100%

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

Revision 2517 (diff)
Added by stbuehler about 7 years ago

Fix segfault in mod_expire after failed config parsing (fixes #1992)

Revision 2f4120b3 (diff)
Added by stbuehler about 7 years ago

Fix segfault in mod_expire after failed config parsing (fixes #1992)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2517 152afb58-edef-0310-8abb-c4023f1b3aa9

Revision 2518 (diff)
Added by stbuehler about 7 years ago

Fix segfault in mod_expire after failed config parsing (fixes #1992)

History

#1 Updated by stbuehler about 7 years ago

  • Target version changed from 1.4.22 to 1.4.23

Affected version != target version.

#2 Updated by stbuehler about 7 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2517.

Also available in: Atom