summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2016-11-29 09:49:10 (GMT)
committerRolf Eike Beer <eb@emlix.com>2016-11-29 09:49:10 (GMT)
commit9f742e350e87618400a815e77b91fddb4220d9b6 (patch)
treef62ba3dd4734f3bc30a0f56c19d45e3b1b8c71a0
parent6ddd7920f06d2c8c9d584c5c024032cb1e5b1362 (diff)
fix crash when GnuPG does not output curve fields for keys
BUG:371410 FIXED-IN:16.11.90
-rw-r--r--kgpginterface.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kgpginterface.cpp b/kgpginterface.cpp
index a7831a6..f742ae5 100644
--- a/kgpginterface.cpp
+++ b/kgpginterface.cpp
@@ -166,9 +166,10 @@ readPublicKeysProcess(GPGProc &p, KGpgKeyNode *readNode)
keytype = Convert::toSubType(caps, true);
}
+ const QString curve = (items > 16) ? lsp.at(16) : QString();
publiclistkeys << KgpgKey(lsp.at(4), lsp.at(2).toUInt(), Convert::toTrust(lsp.at(1)),
Convert::toAlgo(lsp.at(3)), subtype, keytype,
- QDateTime::fromTime_t(lsp.at(5).toUInt()), lsp.at(16));
+ QDateTime::fromTime_t(lsp.at(5).toUInt()), curve);
publickey = &publiclistkeys.last();