/ Check-in [65ff5144]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Avoid a warning in fts5.c due to not using generated routine sqlite3Fts5ParserFallback().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 65ff5144a55f1ba2b2ef812a0c988fa2522441177038b8d686eb1d0c558c75d5
User & Date: dan 2018-06-30 20:26:52
Context
2018-07-01
16:05
Quick patch to the Lemon parser template to avoid an array overread reported by OSSFuzz. A proper fix involves enhancements to the table generators in Lemon to make the overread impossible. That fix will take longer to implement. The current check-in is a stop-gap. check-in: 3f6730be user: drh tags: trunk
2018-06-30
20:26
Avoid a warning in fts5.c due to not using generated routine sqlite3Fts5ParserFallback(). check-in: 65ff5144 user: dan tags: trunk
20:15
Merge implementation of SQL window functions from the exp-window-functions into trunk. check-in: 17198a12 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/fts5_expr.c.

    32     32   void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64));
    33     33   void sqlite3Fts5ParserFree(void*, void (*freeProc)(void*));
    34     34   void sqlite3Fts5Parser(void*, int, Fts5Token, Fts5Parse*);
    35     35   #ifndef NDEBUG
    36     36   #include <stdio.h>
    37     37   void sqlite3Fts5ParserTrace(FILE*, char*);
    38     38   #endif
           39  +int sqlite3Fts5ParserFallback(int);
    39     40   
    40     41   
    41     42   struct Fts5Expr {
    42     43     Fts5Index *pIndex;
    43     44     Fts5Config *pConfig;
    44     45     Fts5ExprNode *pRoot;
    45     46     int bDesc;                      /* Iterate in descending rowid order */
................................................................................
  2587   2588     void *pCtx = (void*)pGlobal;
  2588   2589   
  2589   2590     for(i=0; rc==SQLITE_OK && i<ArraySize(aFunc); i++){
  2590   2591       struct Fts5ExprFunc *p = &aFunc[i];
  2591   2592       rc = sqlite3_create_function(db, p->z, -1, SQLITE_UTF8, pCtx, p->x, 0, 0);
  2592   2593     }
  2593   2594   
  2594         -  /* Avoid a warning indicating that sqlite3Fts5ParserTrace() is unused */
         2595  +  /* Avoid warnings indicating that sqlite3Fts5ParserTrace() and
         2596  +  ** sqlite3Fts5ParserFallback() are unused */
  2595   2597   #ifndef NDEBUG
  2596   2598     (void)sqlite3Fts5ParserTrace;
  2597   2599   #endif
         2600  +  (void)sqlite3Fts5ParserFallback;
  2598   2601   
  2599   2602     return rc;
  2600   2603   }
  2601   2604   
  2602   2605   /*
  2603   2606   ** Return the number of phrases in expression pExpr.
  2604   2607   */