diff OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp @ 4956:964bbf5cb365

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Mar 2022 11:48:47 +0100
parents 1610e56cadfb
children 255b02c68908
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp	Wed Mar 23 11:44:40 2022 +0100
+++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp	Wed Mar 23 11:48:47 2022 +0100
@@ -1962,7 +1962,7 @@
     Uint16 rows, columns, bitsAllocated, bitPosition;
     const Sint16* origin = NULL;
     unsigned long originSize = 0;
-    DcmElement* overlay = NULL;
+    DcmElement* overlayElement = NULL;
     Uint8* overlayData = NULL;
     
     if (dataset.findAndGetUint16(DcmTagKey(group, 0x0010), rows).good() &&
@@ -1974,9 +1974,9 @@
         bitsAllocated == 1 &&
         dataset.findAndGetUint16(DcmTagKey(group, 0x0102), bitPosition).good() &&
         bitPosition == 0 &&
-        dataset.findAndGetElement(DcmTagKey(group, 0x3000), overlay).good() &&
-        overlay != NULL &&
-        overlay->getUint8Array(overlayData).good() &&
+        dataset.findAndGetElement(DcmTagKey(group, 0x3000), overlayElement).good() &&
+        overlayElement != NULL &&
+        overlayElement->getUint8Array(overlayData).good() &&
         overlayData != NULL)
     {
       /**
@@ -1992,7 +1992,7 @@
        **/
 
       unsigned int expectedSize = Ceiling(rows * columns, 8);
-      if (overlay->getLengthField() < expectedSize)
+      if (overlayElement->getLengthField() < expectedSize)
       {
         throw OrthancException(ErrorCode_CorruptedFile, "Overlay doesn't have a valid number of bits");
       }