Bug #2739
closedmod_accesslog crashes in v1.4.40 for specified format %T
Description
Hi,
when using this:
accesslog.format = "%h V %u %t \"%r\" %>s %b \"{Referer}i\" \"%{User-Agent}i\" %T"
The mod_accesslog.so from the new v1.4.40 segfaults with:
[16944.995014] lighttpd7239: segfault at 0 ip 00007fdfbfc8ac8e sp 00007ffd0a6cead0 error 4 in mod_accesslog.so[7fdfbfc89000+5000]
It does however work just fine in v1.4.39. I have not yet put an effort into debugging why but will attempt to do that shortly.
Files
Updated by HenrikHolst over 8 years ago
- File mod_accesslog.c.diff mod_accesslog.c.diff added
Found the problem. There was a null pointer reference on f->string->ptr before checking if the string was empty. Attached patch fixes this.
Updated by gstrauss over 8 years ago
- Subject changed from mod_accesslog crashes in v1.4.40 for specified format to mod_accesslog crashes in v1.4.40 for specified format %T
- Category set to mod_accesslog
- Status changed from New to Fixed
- Priority changed from Normal to High
- Target version changed from 1.4.x to 1.4.41
Sorry about that. I hadn't realized it was a segfault. Fixed a few days ago in master in 9c49dc9a
Thanks for the report and for the patch!
Updated by gstrauss over 8 years ago
FYI: a workaround is to specify %{s}T instead of %T
This will be fixed in lighttpd 1.4.41
Also available in: Atom