Project

General

Profile

Actions

Bug #2739

closed

mod_accesslog crashes in v1.4.40 for specified format %T

Added by HenrikHolst over 8 years ago. Updated over 8 years ago.

Status:
Fixed
Priority:
High
Category:
mod_accesslog
Target version:
ASK QUESTIONS IN Forums:

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

mod_accesslog.c.diff (1.43 KB) mod_accesslog.c.diff HenrikHolst, 2016-07-20 13:47
Actions #1

Updated by HenrikHolst over 8 years ago

Found the problem. There was a null pointer reference on f->string->ptr before checking if the string was empty. Attached patch fixes this.

Actions #2

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!

Actions #3

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

Actions

Also available in: Atom