1
0
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:
drh
2015-06-02 14:02:18 +00:00
parent fcb9f4f3ca
commit cd8fb7cfd5
4 changed files with 11 additions and 11 deletions

View File

@@ -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);