mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
All bytes of a page are initialized, even bytes that follow a 2-byte cell
on a malformed page. FossilOrigin-Name: 7373a004ed0e2781cda503c73e9a94f24350ef79
This commit is contained in:
@@ -6897,13 +6897,13 @@ static int balance_nonroot(
|
||||
memcpy(apCell[nCell], &pOld->aData[8], 4);
|
||||
}else{
|
||||
assert( leafCorrection==4 );
|
||||
if( szCell[nCell]<4 ){
|
||||
while( 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 || CORRUPT_DB );
|
||||
assert( apCell[nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB );
|
||||
aSpace1[iSpace1++] = 0x00;
|
||||
szCell[nCell] = 4;
|
||||
szCell[nCell]++;
|
||||
}
|
||||
}
|
||||
nCell++;
|
||||
|
Reference in New Issue
Block a user