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 <peterh@wetafx.co.nz>
  • Loading branch information
peterhillman authored and cary-ilm committed Aug 17, 2020
1 parent c3ed4a1 commit b0c63c0
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 @@ -2535,7 +2535,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 b0c63c0

Please sign in to comment.