From: drh Date: Wed, 26 Mar 2014 15:05:56 +0000 (+0000) Subject: Add a test case to verify that the previous change avoids excess buffer X-Git-Tag: version-3.8.5~95 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9c131c3664b224dc7be2f30149bc73b6c2b47c5;p=thirdparty%2Fsqlite.git Add a test case to verify that the previous change avoids excess buffer overread in sqlite3VdbeRecordCompare(). FossilOrigin-Name: 2b28e8d582cf10936fa1faca04a16ca2eeead66f --- diff --git a/manifest b/manifest index b9c9cba60c..be675fdb5a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Earlier\sdetection\sof\scorruption\sin\ssqlite3VdbeRecordCompare()\sin\sorder\sto\navoid\sa\spotential\sbuffer\soverread. -D 2014-03-26T14:51:07.017 +C Add\sa\stest\scase\sto\sverify\sthat\sthe\sprevious\schange\savoids\sexcess\sbuffer\noverread\sin\ssqlite3VdbeRecordCompare(). +D 2014-03-26T15:05:56.169 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 645794bfc0bbcb962df34302a52118b0ed6a21fb +F test/corruptI.test 487e9e5eac227fca974eed0a0bd5791cccc9eb86 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 851abdb8fd9b5a8a6ce21db53d30dbac3c430cc7 -R 08734d76a115f4a142a4825f21f3cdab +P 28ddecff044dbc2dff50a7d8406ab67dfe06587f +R 6b54752b8296f7dffb679821462bd1b5 U drh -Z 2973842cba6cb939f8ad2063fb07de64 +Z 7c53e6dad71c7413b3950e5c5e55a2eb diff --git a/manifest.uuid b/manifest.uuid index 8e8ee672b5..bdd003989c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -28ddecff044dbc2dff50a7d8406ab67dfe06587f \ No newline at end of file +2b28e8d582cf10936fa1faca04a16ca2eeead66f \ No newline at end of file diff --git a/test/corruptI.test b/test/corruptI.test index c2eec8ba70..bb8d984938 100644 --- a/test/corruptI.test +++ b/test/corruptI.test @@ -32,14 +32,23 @@ do_execsql_test 1.1 { PRAGMA auto_vacuum=0; CREATE TABLE t1(a); CREATE INDEX i1 ON t1(a); - INSERT INTO t1 VALUES('a'); + INSERT INTO t1 VALUES('abcdefghijklmnop'); } {} db close do_test 1.2 { set offset [hexio_get_int [hexio_read test.db [expr 2*1024 + 8] 2]] set off [expr 2*1024 + $offset + 1] - hexio_write test.db $off FF06 + hexio_write test.db $off 7f06 + sqlite3 db test.db + catchsql { SELECT * FROM t1 WHERE a = 10 } +} {0 {}} + +do_test 1.3 { + db close + set offset [hexio_get_int [hexio_read test.db [expr 2*1024 + 8] 2]] + set off [expr 2*1024 + $offset + 1] + hexio_write test.db $off FFFF7f02 sqlite3 db test.db catchsql { SELECT * FROM t1 WHERE a = 10 } } {0 {}}