fix segfault when calling sqlite3_rekey before sqlite3_key - openssl should be initialized on either call

This commit is contained in:
Stephen Lombardo 2009-08-11 12:14:19 -04:00
parent e47eea5646
commit 3ce6037365

View File

@ -488,6 +488,7 @@ int sqlite3_key(sqlite3 *db, const void *pKey, int nKey) {
*/
int sqlite3_rekey(sqlite3 *db, const void *pKey, int nKey) {
CODEC_TRACE(("sqlite3_rekey: entered db=%d pKey=%s, nKey=%d\n", db, pKey, nKey));
OpenSSL_add_all_algorithms();
if(db && pKey && nKey) {
struct Db *pDb = &db->aDb[0];
CODEC_TRACE(("sqlite3_rekey: database pDb=%d\n", pDb));