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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user