diff --git a/OpenEXR/IlmImf/ImfDwaCompressor.cpp b/OpenEXR/IlmImf/ImfDwaCompressor.cpp index 872c8c7d1e..c378f2e47e 100644 --- a/OpenEXR/IlmImf/ImfDwaCompressor.cpp +++ b/OpenEXR/IlmImf/ImfDwaCompressor.cpp @@ -2533,7 +2533,7 @@ DwaCompressor::uncompress if (acCompressedSize > 0) { - if (totalAcUncompressedCount*sizeof(unsigned short) > _packedAcBufferSize) + if ( !_packedAcBuffer || totalAcUncompressedCount*sizeof(unsigned short) > _packedAcBufferSize) { throw IEX_NAMESPACE::InputExc("Error uncompressing DWA data" "(corrupt header).");