Fossil SCM

Fix a segfault on the "fossil cgi" command.

drh 2008-05-22 12:38 trunk
Commit b4f9d90ca37ea1dc8fc3670b636f05ade9c78c4f
1 file changed +2
+2
--- src/main.c
+++ src/main.c
@@ -573,10 +573,12 @@
573573
if( g.argc==3 && strcmp(g.argv[1],"cgi")==0 ){
574574
zFile = g.argv[2];
575575
}else{
576576
zFile = g.argv[1];
577577
}
578
+ g.httpOut = stdout;
579
+ g.httpIn = stdin;
578580
g.cgiPanic = 1;
579581
blob_read_from_file(&config, zFile);
580582
while( blob_line(&config, &line) ){
581583
if( !blob_token(&line, &key) ) continue;
582584
if( blob_buffer(&key)[0]=='#' ) continue;
583585
--- src/main.c
+++ src/main.c
@@ -573,10 +573,12 @@
573 if( g.argc==3 && strcmp(g.argv[1],"cgi")==0 ){
574 zFile = g.argv[2];
575 }else{
576 zFile = g.argv[1];
577 }
 
 
578 g.cgiPanic = 1;
579 blob_read_from_file(&config, zFile);
580 while( blob_line(&config, &line) ){
581 if( !blob_token(&line, &key) ) continue;
582 if( blob_buffer(&key)[0]=='#' ) continue;
583
--- src/main.c
+++ src/main.c
@@ -573,10 +573,12 @@
573 if( g.argc==3 && strcmp(g.argv[1],"cgi")==0 ){
574 zFile = g.argv[2];
575 }else{
576 zFile = g.argv[1];
577 }
578 g.httpOut = stdout;
579 g.httpIn = stdin;
580 g.cgiPanic = 1;
581 blob_read_from_file(&config, zFile);
582 while( blob_line(&config, &line) ){
583 if( !blob_token(&line, &key) ) continue;
584 if( blob_buffer(&key)[0]=='#' ) continue;
585

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button