Skip to content

Commit

Permalink
Fix for AcademySoftwareFoundation#494: validate tile coordinates when…
Browse files Browse the repository at this point in the history
… doing copyPixels
  • Loading branch information
peterhillman committed Jul 25, 2019
1 parent b19c8d2 commit a651295
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 a651295

Please sign in to comment.