/ Check-in [5d0ceb8d]
Login

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

Overview
Comment:Make sure the tableColumnList() routine of the command-line shell does not cause a null-pointer dereference in an error condition.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.21
Files: files | file ages | folders
SHA3-256: 5d0ceb8dcdef92cd72307e532a4a6c269b2c458fecb0bbede0bb941099eebc5b
User & Date: drh 2017-10-12 10:28:30
Context
2017-10-12
14:03
Merge fixes from trunk. All changes are on makefiles and test scripts. There are no core code changes. check-in: 1fb87a0c user: drh tags: branch-3.21
13:21
Merge fixes from the 3.21 branch. check-in: 29292169 user: drh tags: trunk
10:28
Make sure the tableColumnList() routine of the command-line shell does not cause a null-pointer dereference in an error condition. check-in: 5d0ceb8d user: drh tags: branch-3.21
01:19
Fix a typo in a numeric constant in an assert() - a bug that has been present in the code since check-in [79e22b95038] on 2010-03-30. check-in: f0a2724f user: drh tags: branch-3.21
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

  3797   3797           isIPK = 1;
  3798   3798         }else{
  3799   3799           isIPK = 0;
  3800   3800         }
  3801   3801       }
  3802   3802     }
  3803   3803     sqlite3_finalize(pStmt);
         3804  +  if( azCol==0 ) return 0;
  3804   3805     azCol[0] = 0;
  3805   3806     azCol[nCol+1] = 0;
  3806   3807   
  3807   3808     /* The decision of whether or not a rowid really needs to be preserved
  3808   3809     ** is tricky.  We never need to preserve a rowid for a WITHOUT ROWID table
  3809   3810     ** or a table with an INTEGER PRIMARY KEY.  We are unable to preserve
  3810   3811     ** rowids on tables where the rowid is inaccessible because there are other

Changes to src/shell.c.in.

  2437   2437           isIPK = 1;
  2438   2438         }else{
  2439   2439           isIPK = 0;
  2440   2440         }
  2441   2441       }
  2442   2442     }
  2443   2443     sqlite3_finalize(pStmt);
         2444  +  if( azCol==0 ) return 0;
  2444   2445     azCol[0] = 0;
  2445   2446     azCol[nCol+1] = 0;
  2446   2447   
  2447   2448     /* The decision of whether or not a rowid really needs to be preserved
  2448   2449     ** is tricky.  We never need to preserve a rowid for a WITHOUT ROWID table
  2449   2450     ** or a table with an INTEGER PRIMARY KEY.  We are unable to preserve
  2450   2451     ** rowids on tables where the rowid is inaccessible because there are other