mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Binary file I/O infrastructure added and used to increase test coverage
for detection of corrupt database files. (CVS 3822) FossilOrigin-Name: 479b3d965b19c3ec4cb72542718751debf8ff75c
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.351 2007/04/06 01:03:33 drh Exp $
|
||||
** $Id: btree.c,v 1.352 2007/04/06 15:02:14 drh Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** For a detailed discussion of BTrees, refer to
|
||||
@@ -1870,7 +1870,7 @@ static int lockBtree(BtShared *pBt){
|
||||
goto page1_init_failed;
|
||||
}
|
||||
pageSize = get2byte(&page1[16]);
|
||||
if( ((pageSize-1)&pageSize)!=0 ){
|
||||
if( ((pageSize-1)&pageSize)!=0 || pageSize<512 ){
|
||||
goto page1_init_failed;
|
||||
}
|
||||
assert( (pageSize & 7)==0 );
|
||||
|
Reference in New Issue
Block a user