Skip to content

Commit

Permalink
verify data size in deepscanlines with NO_COMPRESSION (AcademySoftwar…
Browse files Browse the repository at this point in the history
…eFoundation#1037)

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
  • Loading branch information
peterhillman authored and cary-ilm committed Jun 22, 2021
1 parent 1d26515 commit a38f3bc
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 a38f3bc

Please sign in to comment.