Skip to content

Commit

Permalink
fix check for valid ruleSize
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hillman <[email protected]>
  • Loading branch information
peterhillman committed Feb 4, 2020
1 parent a6408c9 commit 2ae5f83
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 @@ -2422,7 +2422,7 @@ DwaCompressor::uncompress
unsigned short ruleSize = 0;
Xdr::read<CharPtrIO>(dataPtr, ruleSize);

if (ruleSize < 0)
if (ruleSize < Xdr::size<unsigned short>() )
throw IEX_NAMESPACE::InputExc("Error uncompressing DWA data"
" (corrupt header file).");

Expand Down

0 comments on commit 2ae5f83

Please sign in to comment.