From: Esme Povirk <esme@codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59428 --- dlls/windowscodecs/gifformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 290ae6bf899..287a49f83e9 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -607,7 +607,7 @@ static HRESULT copy_interlaced_pixels(const BYTE *srcbuffer, if (dststride < rc->Width) return E_INVALIDARG; - if ((dststride * rc->Height) > dstbuffersize) + if ((dststride * (rc->Height - 1)) + rc->Width > dstbuffersize) return E_INVALIDARG; row_offset = rc->X; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10142