/ Check-in [6913831a]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6913831ad2892fdc8331ee53426d935386eacb9e
User & Date: drh 2013-08-01 22:26:56
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: e3c8935f user: drh tags: trunk
22:26
Fix an incorrect expected result in a test case in corruptG.test. check-in: 6913831a 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: e436b2f4 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/corruptG.test.

    54     54   } {1 {database disk image is malformed}}
    55     55   
    56     56   # Corrupt the same file in a slightly different way.  Make the record header
    57     57   # sane, but corrupt one of the serial_type value to indicate a huge payload
    58     58   # such that the payload begins in allocated space but overflows the buffer.
    59     59   #
    60     60   db close
    61         -hexio_write test.db [expr {3*512-15}] 0611ffff7f01
           61  +hexio_write test.db [expr {3*512-15}] 0513ff7f01
    62     62   sqlite3 db test.db
    63     63   
    64     64   do_test 2.1 {
    65     65     catchsql {
    66         -    SELECT rowid FROM t1 WHERE a='bc' and b='xyz123456789';
           66  +    SELECT rowid FROM t1 WHERE a='abc' and b='xyz123456789XYZ';
    67     67     }
    68         -} {0 {}}
           68  +  # The following test result is brittle.  The point above is to try to
           69  +  # force a buffer overread by a corrupt database file.  If we get an
           70  +  # incorrect answer from a corrupt database file, that is OK.  If the
           71  +  # result below changes, that just means that "undefined behavior" has
           72  +  # changed.
           73  +} {0 52}
    69     74   
    70     75   finish_test