From: chenzhengyong <chenzhengyong(a)uniontech.com> The frame index should be strictly less than idCount. Previously, an index equal to idCount was not rejected, leading to an out-of-range access. Signed-off-by: chenzhengyong <chenzhengyong(a)uniontech.com> --- dlls/windowscodecs/icoformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c index ae2ae115e5e..c6bc79d852e 100644 --- a/dlls/windowscodecs/icoformat.c +++ b/dlls/windowscodecs/icoformat.c @@ -662,7 +662,7 @@ static HRESULT WINAPI IcoDecoder_GetFrame(IWICBitmapDecoder *iface, goto fail; } - if (This->header.idCount < index) + if (This->header.idCount <= index) { hr = E_INVALIDARG; goto fail; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9347