mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Fix issue with mem5 allocator when min request size is larger thatn 2^30.
FossilOrigin-Name: d7dae06fb2d57ed6b9555b774712f42077ae4155
This commit is contained in:
@@ -375,6 +375,13 @@ int sqlite3_config(int op, ...){
|
||||
sqlite3GlobalConfig.nHeap = va_arg(ap, int);
|
||||
sqlite3GlobalConfig.mnReq = va_arg(ap, int);
|
||||
|
||||
if( sqlite3GlobalConfig.mnReq<1 ){
|
||||
sqlite3GlobalConfig.mnReq = 1;
|
||||
}else if( sqlite3GlobalConfig.mnReq>(1<<12) ){
|
||||
/* cap min request size at 2^12 */
|
||||
sqlite3GlobalConfig.mnReq = (1<<12);
|
||||
}
|
||||
|
||||
if( sqlite3GlobalConfig.pHeap==0 ){
|
||||
/* If the heap pointer is NULL, then restore the malloc implementation
|
||||
** back to NULL pointers too. This will cause the malloc to go
|
||||
|
||||
Reference in New Issue
Block a user