Fossil

Check-in [2d69772e]
Login

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

Overview
Comment:Don't access g.argv[2], when g.argc indicates there's no such element. Reported by Tony Papadimitriou.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:2d69772e49f3122e3c6c77d3da24ae7c251ea10040736e52c66d539ea29b21aa
User & Date: jan.nijtmans 2017-05-11 09:06:13
Context
2017-05-11
21:00
Add the URL & Checkouts entry to the setup menu. check-in: a53beaab user: drh tags: trunk
10:57
Move the "revert" command off of the main "fossil help" screen. Closed-Leaf check-in: 748ec13b user: drh tags: mistake
09:06
Don't access g.argv[2], when g.argc indicates there's no such element. Reported by Tony Papadimitriou. check-in: 2d69772e user: jan.nijtmans tags: trunk
2017-05-10
16:19
Update the built-in SQLite to the latest 3.19.0 alpha that includes the authorizer callback enhancements. check-in: 094a498d user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/search.c.

595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
      fossil_fatal("-W|--width value must be >20 or 0");
    }
  }else{
    width = -1;
  }

  db_find_and_open_repository(0, 0);
  if( g.argc<2 ) return;
  blob_init(&pattern, g.argv[2], -1);
  for(i=3; i<g.argc; i++){
    blob_appendf(&pattern, " %s", g.argv[i]);
  }
  (void)search_init(blob_str(&pattern),"*","*","...",SRCHFLG_STATIC);
  blob_reset(&pattern);
  search_sql_setup(g.db);







|







595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
      fossil_fatal("-W|--width value must be >20 or 0");
    }
  }else{
    width = -1;
  }

  db_find_and_open_repository(0, 0);
  if( g.argc<3 ) return;
  blob_init(&pattern, g.argv[2], -1);
  for(i=3; i<g.argc; i++){
    blob_appendf(&pattern, " %s", g.argv[i]);
  }
  (void)search_init(blob_str(&pattern),"*","*","...",SRCHFLG_STATIC);
  blob_reset(&pattern);
  search_sql_setup(g.db);