From: dan Date: Mon, 7 Aug 2017 18:54:10 +0000 (+0000) Subject: Fix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative X-Git-Tag: version-3.21.0~182^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=089df506879c9e95476855958a01bb1210f5980c;p=thirdparty%2Fsqlite.git Fix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative parameter in os_unix.c. FossilOrigin-Name: 4249fcf7b0c0233f9b3ba5139702738d5221c5309240e6e91dc139eff59471fe --- diff --git a/manifest b/manifest index 40348eadca..5a37dac9d0 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Update\sbigmmap.test\sto\saccount\sfor\sbuilds\sthat\suse\n"-DSQLITE_MAX_MMAP_SIZE=LL". -D 2017-08-07T18:27:19.354 +C Fix\sa\sproblem\swith\shandling\sSQLITE_FCNTL_MMAP_SIZE\srequests\swith\sa\snegative\nparameter\sin\sos_unix.c. +D 2017-08-07T18:54:10.201 F Makefile.in d9873c9925917cca9990ee24be17eb9613a668012c85a343aef7e5536ae266e8 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 02b469e9dcd5b7ee63fc1fb05babc174260ee4cfa4e0ef2e48c3c6801567a016 @@ -436,7 +436,7 @@ F src/os.c add02933b1dce7a39a005b00a2f5364b763e9a24 F src/os.h 8e976e59eb4ca1c0fca6d35ee803e38951cb0343 F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85 F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586 -F src/os_unix.c bbe39b5921b7ced6d25fcbff9fd17eb4aa101fd0bd97e1db3c3e2d526527f9de +F src/os_unix.c 47b6c1e501902272fa23f1356e1048bcdfa89b9974a664612e4ad018a16bf533 F src/os_win.c 2a6c73eef01c51a048cc4ddccd57f981afbec18a F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a F src/pager.c 1e63b0299cf123cf38c48413ec03190f56c1e7d0ccc6573c467d8ac240b898e9 @@ -1644,7 +1644,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 46c3085dcad6372ac20eff499e17fe11680fdf4adb9186bf8b12221a5047e485 -R 917e163835aeeed6d367dbe94c0c0ca5 +P 7c8b6f1cace42ee1182c252c8e66e5679f523f4248c27d38c075ae21e7c25374 +R 798f9b25fca6a2710c43590a6d82bf28 U dan -Z a557a600c035a5d5a09fd207b43b667b +Z 6e6dcb1a7a4b333e27c902b697e4e4b3 diff --git a/manifest.uuid b/manifest.uuid index 721979933e..5b50b75668 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7c8b6f1cace42ee1182c252c8e66e5679f523f4248c27d38c075ae21e7c25374 \ No newline at end of file +4249fcf7b0c0233f9b3ba5139702738d5221c5309240e6e91dc139eff59471fe \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index 99a06279f3..3daa8fec9a 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); }