Fossil

Check-in [c2a9c1f7f8]
Login

Check-in [c2a9c1f7f8]

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

Overview
Comment:Do not allow webpage names to be used as command-line commands. This prevents deferencing of the null "g.db" pointer for command-line commands.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c2a9c1f7f859925af64589dfa3824d529b3889ac
User & Date: drh 2014-07-16 04:02:26.330
Context
2014-07-16
07:19
make local aDia[] and aChar[] tables "static const". ... (check-in: 5b26a50e1b user: jan.nijtmans tags: trunk)
04:02
Do not allow webpage names to be used as command-line commands. This prevents deferencing of the null "g.db" pointer for command-line commands. ... (check-in: c2a9c1f7f8 user: drh tags: trunk)
2014-07-14
12:09
Detect invalid wiki manifests containing J and/or K cards (missed those in the previous commit). Report card problems in manifests in alphabetical order. ... (check-in: 313de568dc user: jan.nijtmans tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
653
654
655
656
657
658
659
660


661
662
663
664
665
666
667
    }
    zCmdName = g.argv[1];
  }
#ifndef _WIN32
  if( !is_valid_fd(2) ) fossil_panic("file descriptor 2 not open");
  /* if( is_valid_fd(3) ) fossil_warning("file descriptor 3 is open"); */
#endif
  rc = name_search(zCmdName, aCommand, count(aCommand), &idx);


  if( rc==1 ){
#ifdef FOSSIL_ENABLE_TH1_HOOKS
    if( !g.isHTTP && !g.fNoThHook ){
      rc = Th_CommandHook(zCmdName, 0);
    }else{
      rc = TH_OK;
    }







|
>
>







653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
    }
    zCmdName = g.argv[1];
  }
#ifndef _WIN32
  if( !is_valid_fd(2) ) fossil_panic("file descriptor 2 not open");
  /* if( is_valid_fd(3) ) fossil_warning("file descriptor 3 is open"); */
#endif
  rc = name_search(zCmdName, aCommand + count(aWebpage),
                   count(aCommand) - count(aWebpage), &idx);
  idx += count(aWebpage);
  if( rc==1 ){
#ifdef FOSSIL_ENABLE_TH1_HOOKS
    if( !g.isHTTP && !g.fNoThHook ){
      rc = Th_CommandHook(zCmdName, 0);
    }else{
      rc = TH_OK;
    }