Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxSQLite3CipherSQLCipher : InitializeFromGlobalDefault crash #113

Closed
MAJOR-KENIX opened this issue Nov 8, 2023 · 3 comments
Closed

wxSQLite3CipherSQLCipher : InitializeFromGlobalDefault crash #113

MAJOR-KENIX opened this issue Nov 8, 2023 · 3 comments

Comments

@MAJOR-KENIX
Copy link

MAJOR-KENIX commented Nov 8, 2023

Vor allem möchte ich mich bei dir für deine Arbeit bedanken.

wxSQLite3CipherSQLCipher && wxSQLite3CipherRC4 && wxSQLite3CipherChaCha20 && wxSQLite3CipherAes256 && wxSQLite3CipherAes128 InitializeFromGlobalDefault crash.

That crash
wxSQLite3CipherAes256 *b = new wxSQLite3CipherAes256(); b->InitializeFromGlobalDefault();

That work
wxSQLite3Cipher *a = new wxSQLite3Cipher(); a->InitializeFromGlobalDefault()

@utelle
Copy link
Owner

utelle commented Nov 8, 2023

Vor allem möchte ich mich bei dir für deine Arbeit bedanken.

You are welcome.

wxSQLite3CipherSQLCipher && wxSQLite3CipherRC4 && wxSQLite3CipherChaCha20 && wxSQLite3CipherAes256 && wxSQLite3CipherAes128 InitializeFromGlobalDefault crash.

That crash wxSQLite3CipherAes256 *b = new wxSQLite3CipherAes256(); b->InitializeFromGlobalDefault();

I can confirm that this call can crash. But only if the wxSQLite3 library was not initialized.

The problem can be avoided, by calling the static method wxSQLite3Database::InitializeSQLite() as early as possible after the application started. At least before calling InitializeFromGlobalDefault().

Nevertheless, thanks for reporting the issue. A crash should never happen, even if initialization hasn't been called. I will modify the underlying implementation in SQLite3 Multiple Ciphers. This may take a couple of days, but I will drop a note here, when the problem has been fixed.

That work wxSQLite3Cipher *a = new wxSQLite3Cipher(); a->InitializeFromGlobalDefault()

This is not surprising, because the method of the base class simply does nothing.

@MAJOR-KENIX
Copy link
Author

Sie haben absolut recht, vielen Dank dafür.

utelle added a commit that referenced this issue Nov 9, 2023
- Update to SQLite3 Multiple Ciphers 1.7.4 (based on SQLite 3.44.0)
- Prevent crashes due to uninitialized cipher tables (issue #113)
@utelle
Copy link
Owner

utelle commented Nov 9, 2023

Release 4.9.7 fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants