The issue is in the StatusToErrorMessage function at line 34 in TouchID.m. CFStringGetCStringPtr returns NULL which in turn crashes the std::string constructor.
After looking around in the code, I realized I could sidestep the problem by disabling the database quick unlock setting.
As far as fixing it, I used a bridge to NSString to get the underlying UTF8 C-String and it successfully converts the string:
I'm happy to make a pull request with this change if this is ok.
I'm pretty sure this only happens in macOS 13. I have another machine that is still on 12 and running 2.7.3 and it is ok. Also the crash still occurs going back to an older version of KeePassXC on macOS 13.
KeePassXC - Version 2.7.3
Revision: d8483d3
Qt 5.15.6
Debugging mode is enabled.
Operating system: macOS 13.0
CPU architecture: x86_64
Kernel: darwin 22.1.0
Overview
Steps to Reproduce
Expected Behavior
Database opens without crashing
Actual Behavior
Crash
Context
The issue is in the
StatusToErrorMessage
function at line 34 in TouchID.m.CFStringGetCStringPtr
returnsNULL
which in turn crashes thestd::string
constructor.After looking around in the code, I realized I could sidestep the problem by disabling the database quick unlock setting.
As far as fixing it, I used a bridge to
NSString
to get the underlying UTF8 C-String and it successfully converts the string:I'm happy to make a pull request with this change if this is ok.
I'm pretty sure this only happens in macOS 13. I have another machine that is still on 12 and running 2.7.3 and it is ok. Also the crash still occurs going back to an older version of KeePassXC on macOS 13.
KeePassXC - Version 2.7.3 Revision: d8483d3
Qt 5.15.6 Debugging mode is enabled.
Operating system: macOS 13.0 CPU architecture: x86_64 Kernel: darwin 22.1.0
Enabled extensions:
Cryptographic libraries:
Operating System: macOS