mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix a faulty assert() in btree.c. Update the database fuzz test file with
new test cases. FossilOrigin-Name: 4e621af1345a001360938de76e3b0a14deb5e991
This commit is contained in:
@@ -6141,9 +6141,9 @@ static void insertCell(
|
||||
ins = cellOffset + 2*i;
|
||||
rc = allocateSpace(pPage, sz, &idx);
|
||||
if( rc ){ *pRC = rc; return; }
|
||||
/* The allocateSpace() routine guarantees the following two properties
|
||||
** if it returns success */
|
||||
assert( idx >= end+2 );
|
||||
/* The allocateSpace() routine guarantees the following properties
|
||||
** if it returns successfully */
|
||||
assert( idx >= 0 && (idx >= end+2 || CORRUPT_DB) );
|
||||
assert( idx+sz <= (int)pPage->pBt->usableSize );
|
||||
pPage->nCell++;
|
||||
pPage->nFree -= (u16)(2 + sz);
|
||||
|
Reference in New Issue
Block a user