aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/btree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/btree.c b/src/btree.c
index 5f672082c..c33589ee6 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.423 2007/09/06 22:19:15 drh Exp $
+** $Id: btree.c,v 1.424 2007/09/06 23:39:37 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -1647,7 +1647,9 @@ static int lockBtree(BtShared *pBt){
goto page1_init_failed;
}
pageSize = get2byte(&page1[16]);
- if( ((pageSize-1)&pageSize)!=0 || pageSize<512 ){
+ if( ((pageSize-1)&pageSize)!=0 || pageSize<512 ||
+ (SQLITE_MAX_PAGE_SIZE<32768 && pageSize>SQLITE_MAX_PAGE_SIZE)
+ ){
goto page1_init_failed;
}
assert( (pageSize & 7)==0 );