mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Another case of returning SQLITE_CORRUPT when a corrupt database file
is detected. (CVS 2374) FossilOrigin-Name: 8710192797b5b22f29b2af90198d03664665bd83
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.250 2005/03/09 13:09:44 danielk1977 Exp $
|
||||
** $Id: btree.c,v 1.251 2005/03/10 17:06:34 drh Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** For a detailed discussion of BTrees, refer to
|
||||
@@ -2378,6 +2378,9 @@ static int getPayload(
|
||||
int sqlite3BtreeKey(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
|
||||
assert( pCur->isValid );
|
||||
assert( pCur->pPage!=0 );
|
||||
if( pCur->pPage->intKey ){
|
||||
return SQLITE_CORRUPT;
|
||||
}
|
||||
assert( pCur->pPage->intKey==0 );
|
||||
assert( pCur->idx>=0 && pCur->idx<pCur->pPage->nCell );
|
||||
return getPayload(pCur, offset, amt, (unsigned char*)pBuf, 0);
|
||||
|
Reference in New Issue
Block a user