Fossil SCM
Do not assume that the PATH_INFO environment variable is set by CGI. Give it a default value to avoid segfaults (on Solaris).
Commit
88383d8d4ac1dd71f953f1305f3d395c8c9583da
Parent
1d49c2f65c3b6f7…
1 file changed
+1
-1
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -883,11 +883,11 @@ | ||
| 883 | 883 | int i; |
| 884 | 884 | |
| 885 | 885 | /* If the repository has not been opened already, then find the |
| 886 | 886 | ** repository based on the first element of PATH_INFO and open it. |
| 887 | 887 | */ |
| 888 | - zPathInfo = P("PATH_INFO"); | |
| 888 | + zPathInfo = PD("PATH_INFO",""); | |
| 889 | 889 | if( !g.repositoryOpen ){ |
| 890 | 890 | char *zRepo; |
| 891 | 891 | const char *zOldScript = PD("SCRIPT_NAME", ""); |
| 892 | 892 | char *zNewScript; |
| 893 | 893 | int j, k; |
| 894 | 894 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -883,11 +883,11 @@ | |
| 883 | int i; |
| 884 | |
| 885 | /* If the repository has not been opened already, then find the |
| 886 | ** repository based on the first element of PATH_INFO and open it. |
| 887 | */ |
| 888 | zPathInfo = P("PATH_INFO"); |
| 889 | if( !g.repositoryOpen ){ |
| 890 | char *zRepo; |
| 891 | const char *zOldScript = PD("SCRIPT_NAME", ""); |
| 892 | char *zNewScript; |
| 893 | int j, k; |
| 894 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -883,11 +883,11 @@ | |
| 883 | int i; |
| 884 | |
| 885 | /* If the repository has not been opened already, then find the |
| 886 | ** repository based on the first element of PATH_INFO and open it. |
| 887 | */ |
| 888 | zPathInfo = PD("PATH_INFO",""); |
| 889 | if( !g.repositoryOpen ){ |
| 890 | char *zRepo; |
| 891 | const char *zOldScript = PD("SCRIPT_NAME", ""); |
| 892 | char *zNewScript; |
| 893 | int j, k; |
| 894 |