Fixed a Secret Service Integration connection dereferencing a nullptr in some cases - #13655
Open
ryain11 wants to merge 2 commits into
Open
Fixed a Secret Service Integration connection dereferencing a nullptr in some cases#13655ryain11 wants to merge 2 commits into
ryain11 wants to merge 2 commits into
Conversation
…hen unlocking a database
droidmonkey
approved these changes
Sep 7, 2026
Contributor
Author
|
MacOS build is failing. Is it related to the code or is the test runner flaky? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FIX FOR #13265
This PR resolves the issue where Secret Service request to unlock the database crashes keepassxc in some cases.
The crash happens because if "Prompt to unlock database before searching" option in SSI is enabled, search requests prompt a database unlock prompt. And if by any chance the database is already unlocked, !m_unlockingAnyDatabase evaluates to true, causing an if statement in a file to evaluate to false. so the function does not return and tries to connect() a value that is nullptr. And the program crashes.
Screenshots
Database locked:

As shown, it doesnt cause any problem, but when the database is unlocked:

The program crashes with the output:

Warning
I couldn't verify if the fix actually fully applies to the reporter's exact problem. If the issue persists, I will try to implement another fix.
Testing strategy
I issued a repeated D-Bus search request on a terminal to reproduce the issue. Then asked AI to find the root cause and implemented a fix.
Type of change