diff ui/createinstallerdialog.cpp @ 1268:2efdf2faf4e5

Remove dead variable and fix possible null pointer dereference Problems found by clang static-analyzer
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 26 Sep 2014 19:31:53 +0200
parents 2a1206932f53
children 137a0686de7b
line wrap: on
line diff
--- a/ui/createinstallerdialog.cpp	Fri Sep 26 19:05:44 2014 +0200
+++ b/ui/createinstallerdialog.cpp	Fri Sep 26 19:31:53 2014 +0200
@@ -464,7 +464,9 @@
     /* Check that it is a 3072 bit RSA key as specified */
     if (!pk.pk_info || pk_get_size(&pk) != 3072 ||
             pk.pk_info->type != POLARSSL_PK_RSA) {
-        qDebug() << pk.pk_info->type << "type";
+        if (pk.pk_info) {
+            qDebug() << pk.pk_info->type << "type";
+        }
         qDebug() << POLARSSL_PK_RSA << "rsa";
         qDebug() << "size " << pk_get_size(&pk);
         showErrorMessage(tr("Only 3072 bit RSA keys are supported by the current format."));

http://wald.intevation.org/projects/trustbridge/