Add another test case for the problem fixed by the previous commit.
FossilOrigin-Name: 1a7e0b61c8a6bdd3ed105b9bc8a3732668fd7a897d2ed16c99445498e3c87089
This commit is contained in:
parent
629ec14abc
commit
3ed0f1c936
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Avoid\san\sout-of-bounds\sread\sthat\scan\sbe\scaused\sby\sa\sspecially\sconstructed\njournal\sfile.
|
||||
D 2017-09-14T20:41:17.170
|
||||
C Add\sanother\stest\scase\sfor\sthe\sproblem\sfixed\sby\sthe\sprevious\scommit.
|
||||
D 2017-09-14T21:12:07.969
|
||||
F Makefile.in c644bbe8ebe4aae82ad6783eae6b6beea4c727b99ff97568b847ced5e2ac7afb
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 6a7a74bf60ad395098c0bd175ab054cd65ef85d7f034198d52bcc4d9e5fb4c6b
|
||||
@ -441,7 +441,7 @@ F src/os.c 93e0979b9b55df29c0c4923f73b48e9d3fe728f01dd8ed4f6a9d2f1d79779bc8
|
||||
F src/os.h 8e976e59eb4ca1c0fca6d35ee803e38951cb0343
|
||||
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
|
||||
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
|
||||
F src/os_unix.c 0e365b4c95bd6f5a9d3cea650272eba46706bad2c833f1d0e7ac38521331ddba
|
||||
F src/os_unix.c 3984fc069df59e26f000e30609611cecdb4e93293e6ee52313a473a7e874af1b
|
||||
F src/os_win.c 225432ab6512f63ab2f37eb76872f818b01f0483ba0bea04a7a1168be3070ea5
|
||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||
F src/pager.c 2a523bf8ec77678b35fe56b43ac24045d2f97ad44d58c6a0894c131feda3eeff
|
||||
@ -1046,7 +1046,7 @@ F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
|
||||
F test/misc7.test edd0b63e2ee29a256900b0514f6fff27e19e9bb2
|
||||
F test/misc8.test ba03aaa08f02d62fbb8d3b2f5595c1b33aa9bbc5
|
||||
F test/misuse.test 9e7f78402005e833af71dcab32d048003869eca5abcaccc985d4f8dc1d86bcc7
|
||||
F test/mjournal.test 479076d56e89659cce2197ee0054df4a6578f43e10bdda9bdfcdb6eefaa02575
|
||||
F test/mjournal.test 68b749956f9a179e7e633a3958b48a5a905d28d30c7ec88f3f26dc6f220129db
|
||||
F test/mmap1.test d2cfc1635171c434dcff0ece2f1c8e0a658807ce
|
||||
F test/mmap2.test 9d6dd9ddb4ad2379f29cc78f38ce1e63ed418022
|
||||
F test/mmap3.test b3c297e78e6a8520aafcc1a8f140535594c9086e
|
||||
@ -1654,7 +1654,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 378afa16381a222aafa6009dbbbc92473a69683537f1c265694678b0595a42c8
|
||||
R c2746be599de5d7ee9f8e8da17342031
|
||||
P cf5bf42cad6e019a38dc0a36ff1f53ada619eef5259e175c3554a16669e03202
|
||||
R 8f7468b63be6b7c93b7232094070d3e5
|
||||
U dan
|
||||
Z cb084e7d60ad5fef0134c6ef29bfedb3
|
||||
Z 9fe988a13763bfb5ac0a7e60dbcb1440
|
||||
|
@ -1 +1 @@
|
||||
cf5bf42cad6e019a38dc0a36ff1f53ada619eef5259e175c3554a16669e03202
|
||||
1a7e0b61c8a6bdd3ed105b9bc8a3732668fd7a897d2ed16c99445498e3c87089
|
@ -5952,7 +5952,9 @@ static int unixOpen(
|
||||
}
|
||||
#endif
|
||||
|
||||
assert( zPath==0 || zPath[0]=='/' || eType==SQLITE_OPEN_MASTER_JOURNAL );
|
||||
assert( zPath==0 || zPath[0]=='/'
|
||||
|| eType==SQLITE_OPEN_MASTER_JOURNAL || eType==SQLITE_OPEN_MAIN_JOURNAL
|
||||
);
|
||||
rc = fillInUnixFile(pVfs, fd, pFile, zPath, ctrlFlags);
|
||||
|
||||
open_finished:
|
||||
|
@ -57,6 +57,27 @@ do_execsql_test 1.4 {
|
||||
SELECT * FROM t1;
|
||||
}
|
||||
|
||||
# And now test that nothing bad happens if a master journal contains a
|
||||
# pointer to a journal file that does not have a "-" in the name.
|
||||
#
|
||||
do_test 1.5 {
|
||||
forcedelete test.db2-master test.db-journal test1
|
||||
close [open test.db-journal w]
|
||||
hexio_write test.db-journal 0 746573742e6462322d6d617374657200
|
||||
hexio_write test.db-journal 16 00000010
|
||||
hexio_write test.db-journal 20 0000059f
|
||||
hexio_write test.db-journal 24 d9d505f920a163d7
|
||||
|
||||
close [open test.db2-master w]
|
||||
hexio_write test.db2-master 0 746573743100
|
||||
|
||||
close [open test1 w]
|
||||
hexio_write test1 0 abcd
|
||||
} {2}
|
||||
|
||||
do_execsql_test 1.6 {
|
||||
SELECT * FROM t1;
|
||||
}
|
||||
|
||||
|
||||
finish_test
|
||||
|
Loading…
Reference in New Issue
Block a user