Fossil SCM
Fix a potential segfault when the SSH_CONNECTION environment variable is defined.
Commit
a138dc97fcde6d323e4c3dbf31f3aef2e386cd47
Parent
53aea235faf2cef…
1 file changed
+1
+1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1842,10 +1842,11 @@ | ||
| 1842 | 1842 | |
| 1843 | 1843 | /* |
| 1844 | 1844 | ** Process all requests in a single SSH connection if possible. |
| 1845 | 1845 | */ |
| 1846 | 1846 | void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){ |
| 1847 | + blob_zero(&g.cgiIn); | |
| 1847 | 1848 | do{ |
| 1848 | 1849 | cgi_handle_ssh_http_request(zIpAddr); |
| 1849 | 1850 | process_one_web_page(0, FileGlob); |
| 1850 | 1851 | blob_reset(&g.cgiIn); |
| 1851 | 1852 | } while ( g.fSshClient & CGI_SSH_FOSSIL || |
| 1852 | 1853 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1842,10 +1842,11 @@ | |
| 1842 | |
| 1843 | /* |
| 1844 | ** Process all requests in a single SSH connection if possible. |
| 1845 | */ |
| 1846 | void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){ |
| 1847 | do{ |
| 1848 | cgi_handle_ssh_http_request(zIpAddr); |
| 1849 | process_one_web_page(0, FileGlob); |
| 1850 | blob_reset(&g.cgiIn); |
| 1851 | } while ( g.fSshClient & CGI_SSH_FOSSIL || |
| 1852 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1842,10 +1842,11 @@ | |
| 1842 | |
| 1843 | /* |
| 1844 | ** Process all requests in a single SSH connection if possible. |
| 1845 | */ |
| 1846 | void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){ |
| 1847 | blob_zero(&g.cgiIn); |
| 1848 | do{ |
| 1849 | cgi_handle_ssh_http_request(zIpAddr); |
| 1850 | process_one_web_page(0, FileGlob); |
| 1851 | blob_reset(&g.cgiIn); |
| 1852 | } while ( g.fSshClient & CGI_SSH_FOSSIL || |
| 1853 |