From 812d6fea036ea279d8a75890f202dbcf890ed883 Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt Date: Wed, 20 May 2015 12:42:01 +0200 Subject: [PATCH] Fix seg-fault in case of viewing details of a Crl with unknown issuer Additionally set the toolTip with the internal name of the revoked certificate for all columns Thanks to Patrick Monnerat --- widgets/RevocationList.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/widgets/RevocationList.cpp b/widgets/RevocationList.cpp index 34bd42b1..85b3cc9b 100644 --- a/widgets/RevocationList.cpp +++ b/widgets/RevocationList.cpp @@ -10,7 +10,7 @@ #include "lib/asn1int.h" #include "lib/pki_x509.h" -enum revCol { Cnumber, Cserial, Cdate, Creason, CiDate }; +enum revCol { Cnumber, Cserial, Cdate, Creason, CiDate, Cmax }; class revListItem : public QTreeWidgetItem { @@ -41,10 +41,11 @@ static void addRevItem(QTreeWidget *certList, const x509rev &revit, revListItem *current; pki_x509 *rev; a1time a; - rev = iss->getBySerial(revit.getSerial()); + rev = iss ? iss->getBySerial(revit.getSerial()) : NULL; current = new revListItem(certList); if (rev != NULL) { - current->setToolTip(Cserial, rev->getIntName() ); + for (int i = 0; i < Cmax; i++) + current->setToolTip(i, rev->getIntName()); } current->setText(Cnumber, QString("%1").arg(no)); current->setText(Cserial, revit.getSerial().toHex());