SQLite

Check-in [d33b9eb256]
Login

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

Overview
Comment:Avoid calling sqite3VdbeRecordCompare() with uninitialized memory following an OOM. Doing so is harmless, but it worries valgrind.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d33b9eb2567561ccfdc588c95604cce9b697d768
User & Date: drh 2009-08-25 13:53:49.000
Context
2009-08-25
14:24
Make sure that the output of EXPLAIN is right when the P4 argument of an opcode is of type P4_MEM with the MEM having type MEM_Blob. (check-in: 6a623e6cf0 user: drh tags: trunk)
13:53
Avoid calling sqite3VdbeRecordCompare() with uninitialized memory following an OOM. Doing so is harmless, but it worries valgrind. (check-in: d33b9eb256 user: drh tags: trunk)
13:10
Fix an uninitialized variable in sqlite3VdbeIdxRowid(). (check-in: 6e787e18fa user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/btree.c.
4342
4343
4344
4345
4346
4347
4348




4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
          nCell = (int)pCur->info.nKey;
          pCellKey = sqlite3Malloc( nCell );
          if( pCellKey==0 ){
            rc = SQLITE_NOMEM;
            goto moveto_finish;
          }
          rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);




          c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
          sqlite3_free(pCellKey);
          if( rc ) goto moveto_finish;
        }
      }
      if( c==0 ){
        if( pPage->intKey && !pPage->leaf ){
          lwr = idx;
          upr = lwr - 1;
          break;







>
>
>
>


<







4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354

4355
4356
4357
4358
4359
4360
4361
          nCell = (int)pCur->info.nKey;
          pCellKey = sqlite3Malloc( nCell );
          if( pCellKey==0 ){
            rc = SQLITE_NOMEM;
            goto moveto_finish;
          }
          rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
          if( rc ){
            sqlite3_free(pCellKey);
            goto moveto_finish;
          }
          c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
          sqlite3_free(pCellKey);

        }
      }
      if( c==0 ){
        if( pPage->intKey && !pPage->leaf ){
          lwr = idx;
          upr = lwr - 1;
          break;