Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2022-10-27 06:51:49 +0300
committerJonathan White <support@dmapps.us>2022-10-27 23:41:29 +0300
commit2583cc4aa4fe5c05639d48ee579925af0ff170ce (patch)
tree9b74b3563b0bff04730f020236a78ba441bcb211
parent422fd9125534fc26adf85d6bd31dd868a19f910d (diff)
Fix crash on macOS when unlocking database
* Fix #8639
-rw-r--r--src/touchid/TouchID.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/touchid/TouchID.mm b/src/touchid/TouchID.mm
index 7d6332cc2..688ddc451 100644
--- a/src/touchid/TouchID.mm
+++ b/src/touchid/TouchID.mm
@@ -31,7 +31,11 @@ inline std::string StatusToErrorMessage(OSStatus status)
return std::to_string(status);
}
- std::string result(CFStringGetCStringPtr(text, kCFStringEncodingUTF8));
+ auto msg = CFStringGetCStringPtr(text, kCFStringEncodingUTF8);
+ std::string result;
+ if (msg) {
+ result = msg;
+ }
CFRelease(text);
return result;
}