Skip to content

Commit

Permalink
Fix for #494: validate tile coordinates when doing copyPixels
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhillman authored and kdt3rd committed Jul 25, 2019
1 parent c046738 commit 6bb3671
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions OpenEXR/IlmImf/ImfTiledInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,13 @@ TiledInputFile::rawTileData (int &dx, int &dy,
throw IEX_NAMESPACE::ArgExc ("rawTileData read the wrong tile");
}
}
else
{
if(!isValidTile (dx, dy, lx, ly) )
{
throw IEX_NAMESPACE::IoExc ("rawTileData read an invalid tile");
}
}
pixelData = tileBuffer->buffer;
}
catch (IEX_NAMESPACE::BaseExc &e)
Expand Down

0 comments on commit 6bb3671

Please sign in to comment.