keepassxc icon indicating copy to clipboard operation
keepassxc copied to clipboard

Fix bug where pressing home on empty tag field crashes the program.

Open libklein opened this issue 4 months ago • 0 comments

Fix bug where pressing home on empty tag field crashes the program.

Bug is caused by https://github.com/libklein/keepassxc/blob/develop/src/gui/tag/TagsEdit.cpp#L340. The currentText().isEmpty() allows to invalidate the invariant if the current (and only) tag is empty. In this case, tags is resized to 0 (the only tag is erased) and the program crashes as currentText() accessed in https://github.com/libklein/keepassxc/blob/develop/src/gui/tag/TagsEdit.cpp#L504 fails as the tags list is now empty (https://github.com/libklein/keepassxc/blob/develop/src/gui/tag/TagsEdit.cpp#L387).

Fixes: #11344

  • ✅ Bug fix (non-breaking change that fixes an issue)

libklein avatar Oct 10 '24 22:10 libklein