/ Check-in [6aeece19]
Login

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

Overview
Comment:Avoid accessing a single uninitialized byte when moving a rare 3-byte cell from an internal page to a leaf. This was not actually causing a problem, just a valgrind warning.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6aeece19a235344be2537e66a3fe08b1febfb5a0
User & Date: dan 2014-12-06 14:56:49
Context
2014-12-08
18:08
Add a missing mutex around calls to clear the KeyInfo cache when closing a database connection. check-in: 7047ce32 user: drh tags: trunk
07:50
Update this branch with latest trunk changes. check-in: 69a312ad user: dan tags: ota-update
2014-12-06
14:56
Avoid accessing a single uninitialized byte when moving a rare 3-byte cell from an internal page to a leaf. This was not actually causing a problem, just a valgrind warning. check-in: 6aeece19 user: dan tags: trunk
02:05
Fix a (harmless) uninitialized variable reference in b-tree balancing for auto-vacuumed tables with overflow pages. check-in: dd1dd445 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/btree.c.

6855
6856
6857
6858
6859
6860
6861
6862




6863
6864
6865
6866
6867
6868
6869
        assert( pOld->hdrOffset==0 );
        /* The right pointer of the child page pOld becomes the left
        ** pointer of the divider cell */
        memcpy(apCell[nCell], &pOld->aData[8], 4);
      }else{
        assert( leafCorrection==4 );
        if( szCell[nCell]<4 ){
          /* Do not allow any cells smaller than 4 bytes. */




          szCell[nCell] = 4;
        }
      }
      nCell++;
    }
  }








|
>
>
>
>







6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
        assert( pOld->hdrOffset==0 );
        /* The right pointer of the child page pOld becomes the left
        ** pointer of the divider cell */
        memcpy(apCell[nCell], &pOld->aData[8], 4);
      }else{
        assert( leafCorrection==4 );
        if( szCell[nCell]<4 ){
          /* Do not allow any cells smaller than 4 bytes. If a smaller cell
          ** does exist, pad it with 0x00 bytes. */
          assert( szCell[nCell]==3 );
          assert( apCell[nCell]==&pTemp[iSpace1-3] );
          pTemp[iSpace1++] = 0x00;
          szCell[nCell] = 4;
        }
      }
      nCell++;
    }
  }