From: dan Date: Wed, 26 Mar 2014 15:14:59 +0000 (+0000) Subject: Add an extra test case for the potential buffer overread patched by [28ddecff04]. X-Git-Tag: version-3.8.5~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68916c9fd3d9829a462a993ded1e58fca82637d2;p=thirdparty%2Fsqlite.git Add an extra test case for the potential buffer overread patched by [28ddecff04]. FossilOrigin-Name: f585f5d7a0f9bf8c590388654a3638231eba8892 --- diff --git a/manifest b/manifest index be675fdb5a..fed419c7cf 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sa\stest\scase\sto\sverify\sthat\sthe\sprevious\schange\savoids\sexcess\sbuffer\noverread\sin\ssqlite3VdbeRecordCompare(). -D 2014-03-26T15:05:56.169 +C Add\san\sextra\stest\scase\sfor\sthe\spotential\sbuffer\soverread\spatched\sby\s[28ddecff04]. +D 2014-03-26T15:14:59.762 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -405,7 +405,7 @@ F test/corruptE.test 193b4ca4e927e77c1d5f4f56203ddc998432a7ee F test/corruptF.test be9fde98e4c93648f1ba52b74e5318edc8f59fe4 F test/corruptG.test 58ec333a01997fe655e34e5bea52b7a2a6b9704d F test/corruptH.test 88ed71a086e13591c917aac6de32750e7c7281cb -F test/corruptI.test 487e9e5eac227fca974eed0a0bd5791cccc9eb86 +F test/corruptI.test 1b796461e5b635e0a74e3c4ecb1121c82d319dff F test/count.test 42a251178e32f617eda33f76236a7f79825a50b5 F test/coveridxscan.test cdb47d01acc4a634a34fd25abe85189e0d0f1e62 F test/crash.test fb9dc4a02dcba30d4aa5c2c226f98b220b2b959f @@ -1159,7 +1159,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff -P 28ddecff044dbc2dff50a7d8406ab67dfe06587f -R 6b54752b8296f7dffb679821462bd1b5 -U drh -Z 7c53e6dad71c7413b3950e5c5e55a2eb +P 2b28e8d582cf10936fa1faca04a16ca2eeead66f +R 76c12b0a4284d7654cb2771b2fc9c8eb +U dan +Z 22c3e1f8cdae5a20dae420dc313d8edd diff --git a/manifest.uuid b/manifest.uuid index bdd003989c..bdc4496d4e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2b28e8d582cf10936fa1faca04a16ca2eeead66f \ No newline at end of file +f585f5d7a0f9bf8c590388654a3638231eba8892 \ No newline at end of file diff --git a/test/corruptI.test b/test/corruptI.test index bb8d984938..087a0f3b01 100644 --- a/test/corruptI.test +++ b/test/corruptI.test @@ -53,5 +53,27 @@ do_test 1.3 { catchsql { SELECT * FROM t1 WHERE a = 10 } } {0 {}} +do_test 2.0 { + execsql { + CREATE TABLE r(x); + INSERT INTO r VALUES('ABCDEFGHIJK'); + CREATE INDEX r1 ON r(x); + } + set pg [db one {SELECT rootpage FROM sqlite_master WHERE name = 'r1'}] +} {5} + +do_test 2.1 { + db close + set offset [hexio_get_int [hexio_read test.db [expr (5-1)*1024 + 8] 2]] + set off [expr (5-1)*1024 + $offset + 1] + hexio_write test.db $off FFFF0004 + sqlite3 db test.db + catchsql { SELECT * FROM r WHERE x >= 10.0 } +} {1 {database disk image is malformed}} + +do_test 2.2 { + catchsql { SELECT * FROM r WHERE x >= 10 } +} {1 {database disk image is malformed}} + finish_test