[Pkg-kde-extras] Bug#574600: [kmymoney] Crashes when clicking on save
Matthias Dellweg
2500 at gmx.de
Sun Mar 21 16:40:59 UTC 2010
This Patch solves the Issue for me.
But it is hot stitched as I do not understand how the function logic works.
Why is it assumed there is a one on one relationship between userIDs and
subkeys?
--- kmymoney-3.96.1.orig/libkgpgfile/kgpgfile.cpp
+++ kmymoney-3.96.1/libkgpgfile/kgpgfile.cpp
@@ -307,7 +307,7 @@ void KGPGFile::keyList(QStringList& list
std::vector<GpgME::UserID> userIDs = key.userIDs();
std::vector<GpgME::Subkey> subkeys = key.subkeys();
- for (unsigned int i = 0; i < userIDs.size(); ++i) {
+ for (unsigned int i = 0; i < std::min(userIDs.size(), subkeys.size());
++i) {
const GpgME::Subkey& skey = subkeys[i];
if (!(skey.isRevoked() || skey.isExpired() || skey.isInvalid() ||
skey.isDisabled())) {
More information about the pkg-kde-extras
mailing list