1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Bug fix: Only trust the database size number at offset 28 if the change

counter at offset 24 matches the version number counter at offset 92.
This prevents corruption in the case of two applications writing to the
database where one is an older version of SQLite and the other is a newer
version.

FossilOrigin-Name: f80c3f922a114e738613955a939db46cf0847038
This commit is contained in:
drh
2010-06-17 02:13:39 +00:00
parent 53f04f3b3f
commit b28e59bbbb
5 changed files with 29 additions and 16 deletions

View File

@ -169,7 +169,7 @@ static void print_db_header(void){
print_decode_line(aData, 80, 4, "meta[10]");
print_decode_line(aData, 84, 4, "meta[11]");
print_decode_line(aData, 88, 4, "meta[12]");
print_decode_line(aData, 92, 4, "meta[13]");
print_decode_line(aData, 92, 4, "Change counter for version number");
print_decode_line(aData, 96, 4, "SQLite version number");
}