Index: src/btree.c ================================================================== --- src/btree.c +++ src/btree.c @@ -6877,14 +6877,10 @@ assert( iSpace1 <= (int)pBt->pageSize ); memcpy(pTemp, apDiv[i], sz); apCell[nCell] = pTemp+leafCorrection; assert( leafCorrection==0 || leafCorrection==4 ); szCell[nCell] = szCell[nCell] - leafCorrection; - if( szCell[nCell]<3 ){ - rc = SQLITE_CORRUPT_BKPT; - goto balance_cleanup; - } if( !pOld->leaf ){ assert( leafCorrection==0 ); assert( pOld->hdrOffset==0 ); /* The right pointer of the child page pOld becomes the left ** pointer of the divider cell */ @@ -6892,12 +6888,12 @@ }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]==&aSpace1[iSpace1-3] ); + assert( szCell[nCell]==3 || CORRUPT_DB ); + assert( apCell[nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB ); aSpace1[iSpace1++] = 0x00; szCell[nCell] = 4; } } nCell++;