1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix an incrblob2 test case so that it works on 32-bit systems.

FossilOrigin-Name: 8d0b11c96e15556dd65ced05708a832aef134e69
This commit is contained in:
drh
2015-03-10 15:34:47 +00:00
parent 9b5d76bf57
commit 94929646f1
3 changed files with 19 additions and 9 deletions

View File

@ -324,11 +324,21 @@ do_test incrblob2-6.2 {
sqlite3_blob_read $rdHandle 0 2
} {AB}
do_test incrblob2-6.2b {
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 2147483647
sqlite3_blob_read $rdHandle 2147483647 100
} errmsg]
lappend rc $errmsg
} {1 SQLITE_ERROR}