Skip to content

Commit

Permalink
verify data size in deepscanlines with NO_COMPRESSION (#1037)
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 Jun 3, 2021
1 parent 25259a8 commit 566f524
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/OpenEXR/ImfDeepScanLineInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,11 @@ LineBufferTask::execute ()

_lineBuffer->format = Compressor::XDR;
_lineBuffer->uncompressedData = _lineBuffer->buffer;

if(_lineBuffer->packedDataSize!=maxBytesPerLine)
{
THROW (IEX_NAMESPACE::InputExc, "Incorrect size for uncompressed data. Expected " << maxBytesPerLine << " got " << _lineBuffer->packedDataSize << " bytes");
}
}
}

Expand Down

0 comments on commit 566f524

Please sign in to comment.