changeset 3741:21efa32c8a10 storage-commitment

safeguard
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 11 Mar 2020 14:28:37 +0100
parents e69c556f1913
children e5713a9acebd
files Core/DicomNetworking/DicomUserConnection.cpp
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Core/DicomNetworking/DicomUserConnection.cpp	Wed Mar 11 11:04:48 2020 +0100
+++ b/Core/DicomNetworking/DicomUserConnection.cpp	Wed Mar 11 14:28:37 2020 +0100
@@ -1685,6 +1685,17 @@
       throw OrthancException(ErrorCode_ParameterOutOfRange);
     }
 
+    for (size_t i = 0; i < sopClassUids.size(); i++)
+    {
+      if (sopClassUids[i].empty() ||
+          sopInstanceUids[i].empty())
+      {
+        throw OrthancException(ErrorCode_ParameterOutOfRange,
+                               "The SOP class/instance UIDs cannot be empty, found: \"" +
+                               sopClassUids[i] + "\" / \"" + sopInstanceUids[i] + "\"");
+      }
+    }
+
     if (transactionUid.size() < 5 ||
         transactionUid.substr(0, 5) != "2.25.")
     {