Group :: System/Libraries
RPM: openexr
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: oss-fuzz.patch
Download
Download
--- a/IlmImf/ImfDeepScanLineInputFile.cpp
+++ b/IlmImf/ImfDeepScanLineInputFile.cpp
@@ -647,6 +647,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");
+ }
}
}
--- a/IlmImf/ImfDeepTiledInputFile.cpp
+++ b/IlmImf/ImfDeepTiledInputFile.cpp
@@ -929,7 +929,7 @@ DeepTiledInputFile::compatibilityInitial
void
DeepTiledInputFile::multiPartInitialize(InputPartData* part)
{
- if (isTiled(part->header.type()) == false)
+ if (part->header.type() != DEEPTILE)
THROW (IEX_NAMESPACE::ArgExc, "Can't build a DeepTiledInputFile from a part of type " << part->header.type());
_data->_streamData = part->mutex;
--- a/IlmImf/ImfRle.cpp
+++ b/IlmImf/ImfRle.cpp
@@ -146,6 +146,11 @@ rleUncompress (int inLength, int maxLeng
if (0 > (maxLength -= count + 1))
return 0;
+ // check the input buffer is big enough to contain
+ // byte to be duplicated
+ if (inLength < 0)
+ return 0;
+
memset(out, *(char*)in, count+1);
out += count+1;