Skip to content

Commit

Permalink
additional verification of DWA data sizes (#914)
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 Feb 6, 2021
1 parent 4dd3e09 commit 1b59bd3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/OpenEXR/ImfDwaCompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2606,6 +2606,14 @@ DwaCompressor::uncompress
throw IEX_NAMESPACE::BaseExc("DC data corrupt.");
}
}
else
{
// if the compressed size is 0, then the uncompressed size must also be zero
if (totalDcUncompressedCount!=0)
{
throw IEX_NAMESPACE::BaseExc("DC data corrupt.");
}
}

//
// Uncompress the RLE data into _rleBuffer, then unRLE the results
Expand Down

0 comments on commit 1b59bd3

Please sign in to comment.