Skip to content

Commit e997cc9

Browse files
committed
Sets missing database reference for rekeying
In function sqlite3_rekey the database reference was not set for the codec in case of rekeying a plain database. As a consequence the cipher parameters were not taken from the right parameter table.
1 parent b8cacee commit e997cc9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sqlite3secure/src/codecext.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ int sqlite3_rekey_v2(sqlite3 *db, const char *zDbName, const void *zKey, int nKe
329329
}
330330
if (rc == SQLITE_OK)
331331
{
332+
CodecSetDb(codec, db);
332333
CodecSetBtree(codec, pBt);
333334
rc = CodecSetupWriteCipher(codec, GetCipherType(db), (char*) zKey, nKey);
334335
}

0 commit comments

Comments
 (0)