1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Make sure large negative arguments to PRAGMA cache_size do not cause

32-bit signed integer overflow.  Also correct a requirements mark.

FossilOrigin-Name: 17c30634a71051158f8d37fd51b3c2a125ad8bd2
This commit is contained in:
drh
2012-01-02 15:45:12 +00:00
parent aa584af088
commit 5dc2bcda7e
4 changed files with 11 additions and 11 deletions

View File

@@ -205,7 +205,7 @@ static int numberOfCachePages(PCache *p){
if( p->szCache>=0 ){
return p->szCache;
}else{
return (-1024*p->szCache)/(p->szPage+p->szExtra);
return (int)((-1024*(i64)p->szCache)/(p->szPage+p->szExtra));
}
}