Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: third_party/sqlite/src/test/incrblob2.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/in.test ('k') | third_party/sqlite/src/test/incrcorrupt.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/incrblob2.test
diff --git a/third_party/sqlite/src/test/incrblob2.test b/third_party/sqlite/src/test/incrblob2.test
index a8f40f09dc11adc3c570c518ec0cf96d005bac72..b6c75cd6c75fcf1d7b89ea8ef2126fc2d202458c 100644
--- a/third_party/sqlite/src/test/incrblob2.test
+++ b/third_party/sqlite/src/test/incrblob2.test
@@ -324,12 +324,44 @@ do_test incrblob2-6.2 {
sqlite3_blob_read $rdHandle 0 2
} {AB}
+if {$::tcl_platform(pointerSize)>=8} {
+ do_test incrblob2-6.2b {
+ set rc [catch {
+ # Prior to 2015-02-07, the following caused a segfault due to
+ # integer overflow.
+ sqlite3_blob_read $rdHandle 2147483647 2147483647
+ } errmsg]
+ lappend rc $errmsg
+ } {1 SQLITE_ERROR}
+}
+do_test incrblob2-6.2c {
+ set rc [catch {
+ # Prior to 2015-02-07, the following caused a segfault due to
+ # integer overflow.
+ sqlite3_blob_read $rdHandle 2147483647 100
+ } errmsg]
+ lappend rc $errmsg
+} {1 SQLITE_ERROR}
+
do_test incrblob2-6.3 {
set wrHandle [db incrblob t1 data 1]
sqlite3_blob_write $wrHandle 0 ZZZZZZZZZZ
sqlite3_blob_read $rdHandle 2 4
} {ZZZZ}
+do_test incrblob2-6.3b {
+ set rc [catch {
+ # Prior to 2015-02-07, the following caused a segfault due to
+ # integer overflow.
+ sqlite3_blob_write $wrHandle 2147483647 YYYYYYYYYYYYYYYYYY
+ } errmsg]
+ lappend rc $errmsg
+} {1 SQLITE_ERROR}
+do_test incrblob2-6.3c {
+ sqlite3_blob_read $rdHandle 2 4
+} {ZZZZ}
+
+
do_test incrblob2-6.4 {
close $wrHandle
close $rdHandle
« no previous file with comments | « third_party/sqlite/src/test/in.test ('k') | third_party/sqlite/src/test/incrcorrupt.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698