From: Yuxuan Shui yshui@codeweavers.com
Missing a bound check for "modes". --- dlls/dxgi/tests/dxgi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index cb8bec5c666..47905bed66d 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -6912,8 +6912,10 @@ static void test_cursor_clipping(IUnknown *device, BOOL is_d3d12) if (modes[mode_idx].Width != width && modes[mode_idx].Height != height) break; } - ok(modes[mode_idx].Width != width && modes[mode_idx].Height != height, + ok(mode_idx < mode_count && modes[mode_idx].Width != width && modes[mode_idx].Height != height, "Failed to find a different mode than %ux%u.\n", width, height); + if (mode_idx >= mode_count) + continue;
ret = ClipCursor(NULL); ok(ret, "ClipCursor failed, error %#lx.\n", GetLastError());