View Ticket
Not logged in
Ticket UUID: cc8fb65705ef72a0d06dc07a3a0ac5c7f63b617c
Title: process_one_web_page crashes if zPathInfo is NULL
Status: Fixed Type: Code_Defect
Severity: Severe Priority:
Subsystem: Resolution: Fixed
Last Modified: 2011-09-11 12:04:29
Version Found In: a4b0b7d9e9
Description & Comments:
If zPathInfo is NULL. Fossil crashes in process_one_web_page. This can be demonstrated by using a CGI script with directory: where no further path is specified.
$ gdb --args ./fossil.exe cgi /c/Apache2.2/cgi-bin/fossil
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) r
Starting program: c:\Users\MJanssen\Projects\fossil/./fossil.exe cgi c:/Apache2.
2/cgi-bin/fossil
[New thread 2100.0xce0]
Program received signal SIGSEGV, Segmentation fault.
process_one_web_page (zNotFound=<value optimized out>) at wbld/main_.c:897
897         while( zPathInfo[i] && zPathInfo[i]!='/' ){ i++; }
(gdb) q
The program is running.  Exit anyway? (y or n) y

dmitry added on 2011-09-11 12:04:29 UTC:
Fixed in [0fc9b5e1f2].