Skip to content

Commit 9abc8c4

Browse files
committed
Gfx/Drawable: Fix potential (but unlikely!) overflow
1 parent 6960914 commit 9abc8c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gfx/drawable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ bool Drawable::blit(
487487

488488
if (x == 0 && y == 0 && surface->getWidth() == getWidth() && surface->getHeight() == getHeight())
489489
{
490-
memcpy(getDrawingBuffer(), surface->getDrawingBuffer(), getWidth() * getHeight() * 4);
490+
memcpy(getDrawingBuffer(), surface->getDrawingBuffer(), (size_t)getWidth() * (size_t)getHeight() * 4l);
491491
return true;
492492
}
493493

0 commit comments

Comments
 (0)