Skip to content

Commit

Permalink
double-check unpackedBuffer created in DWA uncompress
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hillman <[email protected]>
  • Loading branch information
peterhillman authored and cary-ilm committed May 12, 2021
1 parent cd985ea commit 2e17ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfDwaCompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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).");
Expand Down

0 comments on commit 2e17ee6

Please sign in to comment.