mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative
parameter in os_unix.c. FossilOrigin-Name: 4249fcf7b0c0233f9b3ba5139702738d5221c5309240e6e91dc139eff59471fe
This commit is contained in:
@@ -3861,7 +3861,7 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
|
||||
|
||||
/* The value of newLimit may be eventually cast to (size_t) and passed
|
||||
** to mmap(). Restrict its value to 2GB if (size_t) is a 32-bit type. */
|
||||
if( sizeof(size_t)<8 ){
|
||||
if( newLimit>0 && sizeof(size_t)<8 ){
|
||||
newLimit = (newLimit & 0x7FFFFFFF);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user