mod_xsendfile icon indicating copy to clipboard operation
mod_xsendfile copied to clipboard

segfault when request_rec->filename is null

Open max-zelinski opened this issue 10 years ago • 0 comments

Some modules that shortcut translation handler and don't run uri->filename translation (one of those modules is IBM WebSphere 7 plugin) leave request_rec->filename equals to NULL, which makes mod_xsendfile segfault in ap_xsendfile_get_orginal_path because of ap_strrchr(rv, '/') - where rv is NULL.

The possible solution is to check if request_rec->filename is NULL and assign request_rec->filename = request_rec->uri

Here is an email thread from 2002 explaining this problem a little bit.

max-zelinski avatar Apr 12 '14 21:04 max-zelinski