...
diff --git a/coders/dpx.c b/coders/dpx.c
index e812666..734a818 100644
--- a/coders/dpx.c
+++ b/coders/dpx.c
@@ -1116,7 +1116,8 @@
              ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
            offset+=ReadBlob(image,GetStringInfoLength(profile),
              GetStringInfoDatum(profile));
-           (void) SetImageProfile(image,"dpx:user-data",profile,exception);
+           if (EOFBlob(image) != MagickFalse)
+             (void) SetImageProfile(image,"dpx:user-data",profile,exception);
            profile=DestroyStringInfo(profile);
         }
     }