diff options
Diffstat (limited to 'src/dbstat.c')
-rw-r--r-- | src/dbstat.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dbstat.c b/src/dbstat.c index a2c6fe089..e49ace11f 100644 --- a/src/dbstat.c +++ b/src/dbstat.c @@ -397,6 +397,7 @@ static int statDecodePage(Btree *pBt, StatPage *p){ if( nPayload>(u32)nLocal ){ int j; int nOvfl = ((nPayload - nLocal) + nUsable-4 - 1) / (nUsable - 4); + if( iOff+nLocal>nUsable ) goto statPageIsCorrupt; pCell->nLastOvfl = (nPayload-nLocal) - (nOvfl-1) * (nUsable-4); pCell->nOvfl = nOvfl; pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl); |