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

Crash opening database on macOS 13.0 #8697

Closed
jfamiglietti opened this issue Oct 29, 2022 · 1 comment
Closed

Crash opening database on macOS 13.0 #8697

jfamiglietti opened this issue Oct 29, 2022 · 1 comment
Labels

Comments

@jfamiglietti
Copy link

jfamiglietti commented Oct 29, 2022

Overview

Steps to Reproduce

  1. Open Database
  2. Enter password
  3. Press unlock/enter

Expected Behavior

Database opens without crashing

Actual Behavior

Crash

Context

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:

   NSString* resultString = (NSString*)text;
   const char* resultUTF8Chars = [resultString UTF8String];

   std::string result(resultUTF8Chars);
   CFRelease(text);
   return result;

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:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare
  • YubiKey
  • Quick Unlock

Cryptographic libraries:

  • Botan 2.19.2

Operating System: macOS

@droidmonkey
Copy link
Member

#8676

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

No branches or pull requests

2 participants