summaryrefslogtreecommitdiff
path: root/chromium/third_party/sqlite/src/src/mem5.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/sqlite/src/src/mem5.c')
-rw-r--r--chromium/third_party/sqlite/src/src/mem5.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/chromium/third_party/sqlite/src/src/mem5.c b/chromium/third_party/sqlite/src/src/mem5.c
index b61b93e112c..02f4c2744c2 100644
--- a/chromium/third_party/sqlite/src/src/mem5.c
+++ b/chromium/third_party/sqlite/src/src/mem5.c
@@ -424,9 +424,13 @@ static int memsys5Roundup(int n){
if( n<=mem5.szAtom ) return mem5.szAtom;
return mem5.szAtom*2;
}
- if( n>0x40000000 ) return 0;
+ if( n>0x10000000 ){
+ if( n>0x40000000 ) return 0;
+ if( n>0x20000000 ) return 0x40000000;
+ return 0x20000000;
+ }
for(iFullSz=mem5.szAtom*8; iFullSz<n; iFullSz *= 4);
- if( (iFullSz/2)>=n ) return iFullSz/2;
+ if( (iFullSz/2)>=(i64)n ) return iFullSz/2;
return iFullSz;
}