changeset 419:ab070786f478

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 07 May 2013 13:45:02 +0200
parents b79bf2f4ab2e
children 8fb608750024 f35df997250b
files OrthancServer/FromDcmtkBridge.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/FromDcmtkBridge.cpp	Tue May 07 12:03:25 2013 +0200
+++ b/OrthancServer/FromDcmtkBridge.cpp	Tue May 07 13:45:02 2013 +0200
@@ -1240,6 +1240,11 @@
       accessor.reset(new DicomIntegerPixelAccessor(m, pixData, privateContent.size()));
       accessor->SetCurrentFrame(frame);
     }
+    
+    if (accessor.get() == NULL)
+    {
+      throw OrthancException(ErrorCode_BadFileFormat);
+    }
 
     PixelFormat format;
     bool supported = false;