/ Check-in [ac3b6021]
Login

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

Overview
Comment:Move a local variable declaration into the outermost scope in which it is used. This fixes an ASAN warning.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ac3b6021d9437ab1c027850d321f0a3e575b008763d8d515e2347f7d4e7c294b
User & Date: drh 2019-01-13 00:58:57
Context
2019-01-13
20:17
Improved detection of database corruption while balancing pages from an auto_vacuum database with overflow pages. Test cases in TH3. check-in: 35f04235 user: drh tags: trunk
00:58
Move a local variable declaration into the outermost scope in which it is used. This fixes an ASAN warning. check-in: ac3b6021 user: drh tags: trunk
2019-01-12
21:30
Prevent unsigned 32-bit integer overflow from leading to a buffer overread inside of an assert(). The problem fixed here is no reachable in production code. check-in: 0f850a25 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/alter.c.

  1077   1077   ** message in the Parse object.
  1078   1078   */
  1079   1079   static int renameResolveTrigger(Parse *pParse, const char *zDb){
  1080   1080     sqlite3 *db = pParse->db;
  1081   1081     Trigger *pNew = pParse->pNewTrigger;
  1082   1082     TriggerStep *pStep;
  1083   1083     NameContext sNC;
         1084  +  SrcList sSrc;
  1084   1085     int rc = SQLITE_OK;
  1085   1086   
  1086   1087     memset(&sNC, 0, sizeof(sNC));
  1087   1088     sNC.pParse = pParse;
  1088   1089     assert( pNew->pTabSchema );
  1089   1090     pParse->pTriggerTab = sqlite3FindTable(db, pNew->table, 
  1090   1091         db->aDb[sqlite3SchemaToIndex(db, pNew->pTabSchema)].zDbSName
................................................................................
  1107   1108         if( pParse->nErr ) rc = pParse->rc;
  1108   1109       }
  1109   1110       if( rc==SQLITE_OK && pStep->zTarget ){
  1110   1111         Table *pTarget = sqlite3LocateTable(pParse, 0, pStep->zTarget, zDb);
  1111   1112         if( pTarget==0 ){
  1112   1113           rc = SQLITE_ERROR;
  1113   1114         }else if( SQLITE_OK==(rc = sqlite3ViewGetColumnNames(pParse, pTarget)) ){
  1114         -        SrcList sSrc;
  1115   1115           memset(&sSrc, 0, sizeof(sSrc));
  1116   1116           sSrc.nSrc = 1;
  1117   1117           sSrc.a[0].zName = pStep->zTarget;
  1118   1118           sSrc.a[0].pTab = pTarget;
  1119   1119           sNC.pSrcList = &sSrc;
  1120   1120           if( pStep->pWhere ){
  1121   1121             rc = sqlite3ResolveExprNames(&sNC, pStep->pWhere);