Mercurial > trustbridge
changeset 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 (2014-09-26) |
parents | d9ecf3a83620 |
children | b8ec9a52eae8 f1f4059ec320 |
files | ui/createinstallerdialog.cpp ui/sslconnection_bare.cpp |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
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."));
--- a/ui/sslconnection_bare.cpp Fri Sep 26 19:05:44 2014 +0200 +++ b/ui/sslconnection_bare.cpp Fri Sep 26 19:31:53 2014 +0200 @@ -188,7 +188,6 @@ qDebug() << "CN mismatch"; if((ret & BADCERT_NOT_TRUSTED) != 0) qDebug() << "self-signed or not signed by a trusted CA"; - ret = -1; #ifdef RELEASE_BUILD mErrorState = InvalidCertificate; return -1;