diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2020-06-03 03:36:02 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2020-06-03 03:36:02 -0500 |
commit | c755589426b0f0de68d0965ecbbabb4d99609199 (patch) | |
tree | ba565493a8654926ed09010d90541a616834502e /src | |
parent | 98d64af7fd07ecbf264538ad6e9eb8e6a7a7e1d0 (diff) | |
download | kcmldapmanager-c755589426b0f0de68d0965ecbbabb4d99609199.tar.gz kcmldapmanager-c755589426b0f0de68d0965ecbbabb4d99609199.zip |
Fix crash if empty certificate is provided in PKI list
Diffstat (limited to 'src')
-rw-r--r-- | src/userconfigdlg.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/userconfigdlg.cpp b/src/userconfigdlg.cpp index 13d4b26..2fac3d6 100644 --- a/src/userconfigdlg.cpp +++ b/src/userconfigdlg.cpp @@ -519,6 +519,10 @@ void UserConfigDialog::updatePKICertificateList() { for (it = m_user.pkiCertificates.begin(); it != m_user.pkiCertificates.end(); ++it) { PKICertificateEntry certificateData = *it; + // Don't attempt to load empty certificates + if (certificateData.second.size() < 1) + continue; + TQCString ssldata(certificateData.second); ssldata[certificateData.second.size()] = 0; ssldata.replace("-----BEGIN CERTIFICATE-----", ""); |