diff options
Diffstat (limited to 'src/dbstat.c')
-rw-r--r-- | src/dbstat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dbstat.c b/src/dbstat.c index 2fea48ce8..2931024e1 100644 --- a/src/dbstat.c +++ b/src/dbstat.c @@ -452,7 +452,9 @@ 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; + if( iOff+nLocal>nUsable || nPayload>0x7fffffff ){ + goto statPageIsCorrupt; + } pCell->nLastOvfl = (nPayload-nLocal) - (nOvfl-1) * (nUsable-4); pCell->nOvfl = nOvfl; pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl); |