/ Check-in [069e51b1]
Login

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

Overview
Comment:Fix a problem in whereexpr.c causing a crash while processing a user-function taht accepts zero arguments.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | vtab-like-operator
Files: files | file ages | folders
SHA1: 069e51b19c773aa3017a8d307c8daa0766c224ba
User & Date: dan 2015-11-24 18:16:15
Context
2015-11-24
21:23
Add the sqlite3_strlike() interface, which might be useful for implementing LIKE operators on virtual tables. Closed-Leaf check-in: e70ec71d user: drh tags: vtab-like-operator
18:16
Fix a problem in whereexpr.c causing a crash while processing a user-function taht accepts zero arguments. check-in: 069e51b1 user: dan tags: vtab-like-operator
18:04
Fix harmless compiler warnings in the TCL test harness logic. check-in: 2fba7a96 user: drh tags: vtab-like-operator
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/whereexpr.c.

   301    301     Expr *pCol;                     /* Column reference */
   302    302     int i;
   303    303   
   304    304     if( pExpr->op!=TK_FUNCTION ){
   305    305       return 0;
   306    306     }
   307    307     pList = pExpr->x.pList;
   308         -  if( pList->nExpr!=2 ){
          308  +  if( pList==0 || pList->nExpr!=2 ){
   309    309       return 0;
   310    310     }
   311    311     pCol = pList->a[1].pExpr;
   312    312     if( pCol->op!=TK_COLUMN || !IsVirtual(pCol->pTab) ){
   313    313       return 0;
   314    314     }
   315    315     for(i=0; i<ArraySize(aOp); i++){