Skip to content

Commit

Permalink
check EXRAllocAligned succeeded to allocate ScanlineInputFile lineBuf…
Browse files Browse the repository at this point in the history
…fers (AcademySoftwareFoundation#844)

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
  • Loading branch information
peterhillman committed Dec 6, 2020
1 parent 9bda463 commit 1327e06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions OpenEXR/IlmImf/ImfScanLineInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,10 @@ void ScanLineInputFile::initialize(const Header& header)
for (size_t i = 0; i < _data->lineBuffers.size(); i++)
{
_data->lineBuffers[i]->buffer = (char *) EXRAllocAligned(_data->lineBufferSize*sizeof(char),16);
if (!_data->lineBuffers[i]->buffer)
{
throw IEX_NAMESPACE::LogicExc("Failed to allocate memory for scanline buffers");
}
}
}
_data->nextLineBufferMinY = _data->minY - 1;
Expand Down

0 comments on commit 1327e06

Please sign in to comment.