Skip to content

Commit

Permalink
fixes #260, out of bounds vector access
Browse files Browse the repository at this point in the history
noticed by Google Autofuzz

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
  • Loading branch information
kdt3rd authored and nickrasmussen committed Aug 8, 2018
1 parent 19bac86 commit efc360f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions OpenEXR/IlmImf/ImfScanLineInputFile.cpp
Expand Up @@ -375,6 +375,8 @@ readPixelData (InputStreamMutex *streamData,
//

int lineBufferNumber = (minY - ifd->minY) / ifd->linesInBuffer;
if (lineBufferNumber < 0 || lineBufferNumber >= int(ifd->lineOffsets.size()))
THROW (IEX_NAMESPACE::InputExc, "Invalid scan line " << minY << " requested or missing.");

Int64 lineOffset = ifd->lineOffsets[lineBufferNumber];

Expand Down

0 comments on commit efc360f

Please sign in to comment.