SQLite

Check-in [6913831ad2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix an incorrect expected result in a test case in corruptG.test.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6913831ad2892fdc8331ee53426d935386eacb9e
User & Date: drh 2013-08-01 22:26:56.329
Context
2013-08-01
22:27
Fix the CREATE INDEX statement so that trying to create a TEMP index on a non-TEMP table throws an error rather than segfaulting. (check-in: e3c8935f87 user: drh tags: trunk)
22:26
Fix an incorrect expected result in a test case in corruptG.test. (check-in: 6913831ad2 user: drh tags: trunk)
20:26
Fix a potential buffer overread in sqlite3VdbeRecordCompare() when a serial_type specifies a field that starts in bounds but is much too large for the allocated buffer. Mostly harmless. The overread is unlikely to go more than one or two bytes past the end of the buffer. (check-in: e436b2f4e5 user: drh tags: trunk)
Changes
Unified Diff Show Whitespace Changes Patch
Changes to test/corruptG.test.
54
55
56
57
58
59
60
61
62
63
64
65
66
67





68
69
70
} {1 {database disk image is malformed}}

# Corrupt the same file in a slightly different way.  Make the record header
# sane, but corrupt one of the serial_type value to indicate a huge payload
# such that the payload begins in allocated space but overflows the buffer.
#
db close
hexio_write test.db [expr {3*512-15}] 0611ffff7f01
sqlite3 db test.db

do_test 2.1 {
  catchsql {
    SELECT rowid FROM t1 WHERE a='bc' and b='xyz123456789';
  }





} {0 {}}

finish_test







|




|

>
>
>
>
>
|


54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
} {1 {database disk image is malformed}}

# Corrupt the same file in a slightly different way.  Make the record header
# sane, but corrupt one of the serial_type value to indicate a huge payload
# such that the payload begins in allocated space but overflows the buffer.
#
db close
hexio_write test.db [expr {3*512-15}] 0513ff7f01
sqlite3 db test.db

do_test 2.1 {
  catchsql {
    SELECT rowid FROM t1 WHERE a='abc' and b='xyz123456789XYZ';
  }
  # The following test result is brittle.  The point above is to try to
  # force a buffer overread by a corrupt database file.  If we get an
  # incorrect answer from a corrupt database file, that is OK.  If the
  # result below changes, that just means that "undefined behavior" has
  # changed.
} {0 52}

finish_test