Fossil

Check-in [b4f9d90ca3]
Login

Check-in [b4f9d90ca3]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a segfault on the "fossil cgi" command.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b4f9d90ca37ea1dc8fc3670b636f05ade9c78c4f
User & Date: drh 2008-05-22 12:38:23.000
Context
2008-05-22
12:49
Make sure fossil_panic() text is given a proper header in CGI mode. ... (check-in: dbfe682b92 user: drh tags: trunk)
12:38
Fix a segfault on the "fossil cgi" command. ... (check-in: b4f9d90ca3 user: drh tags: trunk)
2008-05-20
20:57
fixed a typo in tktconfig.c ... (check-in: 9d4f1b6514 user: stephan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
571
572
573
574
575
576
577


578
579
580
581
582
583
584
  const char *zFile;
  Blob config, line, key, value;
  if( g.argc==3 && strcmp(g.argv[1],"cgi")==0 ){
    zFile = g.argv[2];
  }else{
    zFile = g.argv[1];
  }


  g.cgiPanic = 1;
  blob_read_from_file(&config, zFile);
  while( blob_line(&config, &line) ){
    if( !blob_token(&line, &key) ) continue;
    if( blob_buffer(&key)[0]=='#' ) continue;
    if( blob_eq(&key, "debug:") && blob_token(&line, &value) ){
      g.fDebug = fopen(blob_str(&value), "a");







>
>







571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
  const char *zFile;
  Blob config, line, key, value;
  if( g.argc==3 && strcmp(g.argv[1],"cgi")==0 ){
    zFile = g.argv[2];
  }else{
    zFile = g.argv[1];
  }
  g.httpOut = stdout;
  g.httpIn = stdin;
  g.cgiPanic = 1;
  blob_read_from_file(&config, zFile);
  while( blob_line(&config, &line) ){
    if( !blob_token(&line, &key) ) continue;
    if( blob_buffer(&key)[0]=='#' ) continue;
    if( blob_eq(&key, "debug:") && blob_token(&line, &value) ){
      g.fDebug = fopen(blob_str(&value), "a");