thamagates / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

Blank document_root option causes segfault #211

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use a blank string for the document_root option.

What is the expected output? What do you see instead?
I would kind of expect that the server would make no attempt to access the 
document root (I'm doing that all myself with the callback). I blanked out the 
document_root field with the intention of making sure Mongoose was locked-down 
and wouldn't try serving any files off the file system (which may not be 
necessary as I'm always returning 1 from the callback, but I changed the option 
just in case).

What version of the product are you using? On what operating system?
Mongoose 2.11 on Windows XP Pro SP3.

Please provide any additional information below.
The problem appears to be that vsnprintf(), called during 
convert_uri_to_file_name(), fails and segfaults.

Original issue reported on code.google.com by jdrgolde...@gmail.com on 10 Dec 2010 at 10:00

GoogleCodeExporter commented 9 years ago
Sorry, missed a reproduction step:

What steps will reproduce the problem?
1. Use a blank string for the document_root option.
2. Connect to the server (try to load a page, say from http://localhost/). 
That's when it crashes (during the call to convert_uri_to_file_name()).

Original comment by jdrgolde...@gmail.com on 11 Dec 2010 at 3:48

GoogleCodeExporter commented 9 years ago
This should have been fixed already, as DOCUMENT_ROOT can be set to NULL.
Please reopen if this is still an issue.

Original comment by valenok on 21 Jun 2011 at 9:58