summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2016-12-08 12:29:01 (GMT)
committerRolf Eike Beer <eb@emlix.com>2016-12-08 12:35:46 (GMT)
commit86b868474fb9b9eb1bf7092bc5cc7aae03f4090e (patch)
treedf00355aeede0bb8bca5922940ebbcdc952bf8b9
parentedce1bcb6f71afa2e1677e89755023e087045c82 (diff)
fix crash when GnuPG does not output curve fields for keys, take 2
This is also needed for subkeys. BUG:373408 CCBUG:371410 FIXED-IN:16.12.0 CCMAIL:aacid@kde.org
-rw-r--r--kgpginterface.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kgpginterface.cpp b/kgpginterface.cpp
index f742ae5..6d87093 100644
--- a/kgpginterface.cpp
+++ b/kgpginterface.cpp
@@ -201,9 +201,10 @@ readPublicKeysProcess(GPGProc &p, KGpgKeyNode *readNode)
if (items > 11)
subtype = Convert::toSubType(lsp.at(11), false);
+ const QString curve = (items > 16) ? lsp.at(16) : QString();
KgpgKeySub sub(lsp.at(4), lsp.at(2).toUInt(), Convert::toTrust(lsp.at(1)),
Convert::toAlgo(lsp.at(3)), subtype, QDateTime::fromTime_t(lsp.at(5).toUInt()),
- lsp.at(16));
+ curve);
// FIXME: Please see kgpgkey.h, KgpgSubKey class
if (items <= 11)