diff options
author | dan <dan@noemail.net> | 2017-08-07 18:54:10 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2017-08-07 18:54:10 +0000 |
commit | 089df506879c9e95476855958a01bb1210f5980c (patch) | |
tree | 1b81c0e80c0a57ed4f9261db82f250abbe5f87e9 /src/os_unix.c | |
parent | 010a016ac9b01e5b42148b4f4862a3eab0f1643f (diff) | |
download | sqlite-089df506879c9e95476855958a01bb1210f5980c.tar.gz sqlite-089df506879c9e95476855958a01bb1210f5980c.zip |
Fix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative
parameter in os_unix.c.
FossilOrigin-Name: 4249fcf7b0c0233f9b3ba5139702738d5221c5309240e6e91dc139eff59471fe
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 99a06279f..3daa8fec9 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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); } |