Project

General

Profile

Actions

Bug #1020

closed

Infinite loop in DcmTLSSCU::initNetwork()

Added by Marco Eichelberg over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Library and Apps
Target version:
-
Start date:
2022-05-06
Due date:
% Done:

100%

Estimated time:
1:00 h
Module:
dcmtls
Operating System:
Compiler:

Description

Apparently DcmTLSSCU::initNetwork() causes an infinite loop when addTrustedCertDir() has been called before, due to a missing iterator increment.

diff --git a/dcmtls/libsrc/tlsscu.cc b/dcmtls/libsrc/tlsscu.cc
index ba7e913c0..86bc625a0 100644
--- a/dcmtls/libsrc/tlsscu.cc
+++ b/dcmtls/libsrc/tlsscu.cc
@@ -107,6 +107,7 @@ OFCondition DcmTLSSCU::initNetwork()
   {
     if (m_tLayer->addTrustedCertificateDir( (*certDir).c_str(), m_certKeyFileFormat).bad())
       DCMNET_WARN("Unable to load certificates from directory '" << *certDir<< "', ignoring");
+      certDir++;
   }

   /* If authentication of both sides (and not only encryption) is desired,

Bug reported and patch provided by DCMTK forum user jogerh in https://forum.dcmtk.org/viewtopic.php?f=1&t=5177, 2022-05-05.

Actions

Also available in: Atom PDF