1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-03 08:01:19 +03:00

Fix a (harmless) uninitialized variable reference in b-tree balancing for

auto-vacuumed tables with overflow pages.

FossilOrigin-Name: dd1dd4451f468599f7a0c2f7b5ee6125db3bb152
This commit is contained in:
drh
2014-12-06 02:05:44 +00:00
parent cd934c3d2c
commit d52d52be80
3 changed files with 12 additions and 8 deletions

View File

@@ -7094,7 +7094,11 @@ static int balance_nonroot(
** if sibling page iOld had the same page number as pNew, and if
** pCell really was a part of sibling page iOld (not a divider or
** overflow cell), we can skip updating the pointer map entries. */
if( pNew->pgno!=aPgno[iOld] || pCell<aOld || pCell>=&aOld[usableSize] ){
if( iOld>=nNew
|| pNew->pgno!=aPgno[iOld]
|| pCell<aOld
|| pCell>=&aOld[usableSize]
){
if( !leafCorrection ){
ptrmapPut(pBt, get4byte(pCell), PTRMAP_BTREE, pNew->pgno, &rc);
}