Skip to content

Commit

Permalink
prevent int overflow when calculating buffer offsets
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
  • Loading branch information
peterhillman committed Jan 20, 2020
1 parent 6e3d95a commit 2c5c1ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ CompositeDeepScanLine::Data::handleDeepFrameBuffer (DeepFrameBuffer& buf,
int start,
int end)
{
int width=_dataWindow.size().x+1;
ptrdiff_t width=_dataWindow.size().x+1;
size_t pixelcount = width * (end-start+1);
pointers.resize(_channels.size());
counts.resize(pixelcount);
Expand Down

0 comments on commit 2c5c1ae

Please sign in to comment.