From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdi32/tests/clipping.c | 11 ++++------- dlls/win32u/region.c | 4 +++- 2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/gdi32/tests/clipping.c b/dlls/gdi32/tests/clipping.c index ce66f9cad09..d965d0b91e8 100644 --- a/dlls/gdi32/tests/clipping.c +++ b/dlls/gdi32/tests/clipping.c @@ -57,7 +57,7 @@ static void test_GetRandomRgn(void) ok(ret != 0, "GetRandomRgn rets %d\n", ret); GetRgnBox(hrgn, &ret_rc); ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc)); - + ret = GetRandomRgn(hdc, hrgn, 2); ok(ret == 0, "GetRandomRgn rets %d\n", ret);
@@ -97,7 +97,7 @@ static void test_GetRandomRgn(void) ok(ret != 0, "GetRandomRgn rets %d\n", ret); GetRgnBox(hrgn, &ret_rc); ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc)); - + IntersectRect(&rc2, &rc, &rc2);
ret = GetRandomRgn(hdc, hrgn, 3); @@ -225,11 +225,10 @@ static void test_ExtCreateRegion(void) /* Cannot be smaller than sizeof(RGNDATAHEADER) */ SetLastError(0xdeadbeef); hrgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) - 1, &rgn.data); - todo_wine ok(!hrgn, "ExtCreateRegion should fail\n"); - todo_wine + /* From Windows 7 returns ERROR_INVALID_PARAMETER error */ ok(GetLastError() == ERROR_INVALID_PARAMETER || - broken(GetLastError() == 0xdeadbeef), "0xdeadbeef, got %lu\n", GetLastError()); + GetLastError() == 0xdeadbeef, "ERROR_INVALID_PARAMETER (win7+) or 0xdeadbeef, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data); @@ -267,10 +266,8 @@ static void test_ExtCreateRegion(void) /* Buffer cannot be smaller than sizeof(RGNDATAHEADER) + 2 * sizeof(RECT) */ SetLastError(0xdeadbeef); hrgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) + 2 * sizeof(RECT) - 1, &rgn.data); - todo_wine ok(!hrgn, "ExtCreateRegion should fail\n"); ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %lu\n", GetLastError()); - }
static void test_GetClipRgn(void) diff --git a/dlls/win32u/region.c b/dlls/win32u/region.c index f32984d1c54..88c80e274b6 100644 --- a/dlls/win32u/region.c +++ b/dlls/win32u/region.c @@ -896,7 +896,9 @@ HRGN WINAPI NtGdiExtCreateRegion( const XFORM *xform, DWORD count, const RGNDATA WINEREGION *obj; const RECT *pCurRect, *pEndRect;
- if (!rgndata || rgndata->rdh.dwSize < sizeof(RGNDATAHEADER)) + if (!rgndata || + rgndata->rdh.dwSize < sizeof(RGNDATAHEADER) || + count < (sizeof(RGNDATAHEADER) + rgndata->rdh.nCount * sizeof(RECT))) return 0;
/* XP doesn't care about the type */
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=143533
Your paranoid android.
=== debian11b (64 bit WoW report) ===
ddraw: ddraw1.c:1102: Test failed: Failed to set clip list, hr 0x80004005. ddraw1.c:1146: Test failed: Failed to blit, hr 0x887600cd. ddraw1.c:1154: Test failed: Expected color 0x000000ff at 80,60, got 0x00000000. ddraw1.c:1154: Test failed: Expected color 0x0000ff00 at 240,60, got 0x00000000. ddraw1.c:1154: Test failed: Expected color 0x000000ff at 80,180, got 0x00000000. ddraw1.c:1154: Test failed: Expected color 0x0000ff00 at 240,180, got 0x00000000. ddraw1.c:1154: Test failed: Expected color 0x00ff0000 at 400,300, got 0x00000000. ddraw1.c:1154: Test failed: Expected color 0x00ffffff at 560,300, got 0x00000000. ddraw1.c:1154: Test failed: Expected color 0x00ff0000 at 400,420, got 0x00000000. ddraw1.c:1154: Test failed: Expected color 0x00ffffff at 560,420, got 0x00000000. ddraw1.c:1162: Test failed: Failed to clear destination surface, hr 0x887600cd. ddraw1.c:1170: Test failed: Expected color 0x000000ff at 80,60, got 0x00000000. ddraw1.c:1170: Test failed: Expected color 0x000000ff at 240,60, got 0x00000000. ddraw1.c:1170: Test failed: Expected color 0x000000ff at 80,180, got 0x00000000. ddraw1.c:1170: Test failed: Expected color 0x000000ff at 240,180, got 0x00000000. ddraw1.c:1170: Test failed: Expected color 0x000000ff at 400,300, got 0x00000000. ddraw1.c:1170: Test failed: Expected color 0x000000ff at 560,300, got 0x00000000. ddraw1.c:1170: Test failed: Expected color 0x000000ff at 400,420, got 0x00000000. ddraw1.c:1170: Test failed: Expected color 0x000000ff at 560,420, got 0x00000000. ddraw1.c:1188: Test failed: Failed to get clip list size, hr 0x887600cd. ddraw2.c:945: Test failed: Failed to set clip list, hr 0x80004005. ddraw2.c:989: Test failed: Failed to blit, hr 0x887600cd. ddraw2.c:997: Test failed: Expected color 0x000000ff at 80,60, got 0x00000000. ddraw2.c:997: Test failed: Expected color 0x0000ff00 at 240,60, got 0x00000000. ddraw2.c:997: Test failed: Expected color 0x000000ff at 80,180, got 0x00000000. ddraw2.c:997: Test failed: Expected color 0x0000ff00 at 240,180, got 0x00000000. ddraw2.c:997: Test failed: Expected color 0x00ff0000 at 400,300, got 0x00000000. ddraw2.c:997: Test failed: Expected color 0x00ffffff at 560,300, got 0x00000000. ddraw2.c:997: Test failed: Expected color 0x00ff0000 at 400,420, got 0x00000000. ddraw2.c:997: Test failed: Expected color 0x00ffffff at 560,420, got 0x00000000. ddraw2.c:1005: Test failed: Failed to clear destination surface, hr 0x887600cd. ddraw2.c:1013: Test failed: Expected color 0x000000ff at 80,60, got 0x00000000. ddraw2.c:1013: Test failed: Expected color 0x000000ff at 240,60, got 0x00000000. ddraw2.c:1013: Test failed: Expected color 0x000000ff at 80,180, got 0x00000000. ddraw2.c:1013: Test failed: Expected color 0x000000ff at 240,180, got 0x00000000. ddraw2.c:1013: Test failed: Expected color 0x000000ff at 400,300, got 0x00000000. ddraw2.c:1013: Test failed: Expected color 0x000000ff at 560,300, got 0x00000000. ddraw2.c:1013: Test failed: Expected color 0x000000ff at 400,420, got 0x00000000. ddraw2.c:1013: Test failed: Expected color 0x000000ff at 560,420, got 0x00000000. ddraw2.c:1031: Test failed: Failed to get clip list size, hr 0x887600cd. ddraw4.c:1135: Test failed: Failed to set clip list, hr 0x80004005. ddraw4.c:1179: Test failed: Failed to blit, hr 0x887600cd. ddraw4.c:1187: Test failed: Expected color 0x000000ff at 80,60, got 0x00000000. ddraw4.c:1187: Test failed: Expected color 0x0000ff00 at 240,60, got 0x00000000. ddraw4.c:1187: Test failed: Expected color 0x000000ff at 80,180, got 0x00000000. ddraw4.c:1187: Test failed: Expected color 0x0000ff00 at 240,180, got 0x00000000. ddraw4.c:1187: Test failed: Expected color 0x00ff0000 at 400,300, got 0x00000000. ddraw4.c:1187: Test failed: Expected color 0x00ffffff at 560,300, got 0x00000000. ddraw4.c:1187: Test failed: Expected color 0x00ff0000 at 400,420, got 0x00000000. ddraw4.c:1187: Test failed: Expected color 0x00ffffff at 560,420, got 0x00000000. ddraw4.c:1195: Test failed: Failed to clear destination surface, hr 0x887600cd. ddraw4.c:1203: Test failed: Expected color 0x000000ff at 80,60, got 0x00000000. ddraw4.c:1203: Test failed: Expected color 0x000000ff at 240,60, got 0x00000000. ddraw4.c:1203: Test failed: Expected color 0x000000ff at 80,180, got 0x00000000. ddraw4.c:1203: Test failed: Expected color 0x000000ff at 240,180, got 0x00000000. ddraw4.c:1203: Test failed: Expected color 0x000000ff at 400,300, got 0x00000000. ddraw4.c:1203: Test failed: Expected color 0x000000ff at 560,300, got 0x00000000. ddraw4.c:1203: Test failed: Expected color 0x000000ff at 400,420, got 0x00000000. ddraw4.c:1203: Test failed: Expected color 0x000000ff at 560,420, got 0x00000000. ddraw4.c:1221: Test failed: Failed to get clip list size, hr 0x887600cd. ddraw7.c:1220: Test failed: Failed to set clip list, hr 0x80004005. ddraw7.c:1264: Test failed: Failed to blit, hr 0x887600cd. ddraw7.c:1272: Test failed: Expected color 0x000000ff at 80,60, got 0x00000000. ddraw7.c:1272: Test failed: Expected color 0x0000ff00 at 240,60, got 0x00000000. ddraw7.c:1272: Test failed: Expected color 0x000000ff at 80,180, got 0x00000000. ddraw7.c:1272: Test failed: Expected color 0x0000ff00 at 240,180, got 0x00000000. ddraw7.c:1272: Test failed: Expected color 0x00ff0000 at 400,300, got 0x00000000. ddraw7.c:1272: Test failed: Expected color 0x00ffffff at 560,300, got 0x00000000. ddraw7.c:1272: Test failed: Expected color 0x00ff0000 at 400,420, got 0x00000000. ddraw7.c:1272: Test failed: Expected color 0x00ffffff at 560,420, got 0x00000000. ddraw7.c:1280: Test failed: Failed to clear destination surface, hr 0x887600cd. ddraw7.c:1288: Test failed: Expected color 0x000000ff at 80,60, got 0x00000000. ddraw7.c:1288: Test failed: Expected color 0x000000ff at 240,60, got 0x00000000. ddraw7.c:1288: Test failed: Expected color 0x000000ff at 80,180, got 0x00000000. ddraw7.c:1288: Test failed: Expected color 0x000000ff at 240,180, got 0x00000000. ddraw7.c:1288: Test failed: Expected color 0x000000ff at 400,300, got 0x00000000. ddraw7.c:1288: Test failed: Expected color 0x000000ff at 560,300, got 0x00000000. ddraw7.c:1288: Test failed: Expected color 0x000000ff at 400,420, got 0x00000000. ddraw7.c:1288: Test failed: Expected color 0x000000ff at 560,420, got 0x00000000. ddraw7.c:1306: Test failed: Failed to get clip list size, hr 0x887600cd.
gdi32: metafile.c:8340: Test failed: GetClipRgn returned 0, expected 1 metafile.c:8343: Test failed: expected sizeof(rgn), got 32 metafile.c:8346: Test failed: expected sizeof(rgn2), got 32 metafile.c:8358: Test failed: rects don't match metafile.c:8365: Test failed: rects don't match metafile.c:8369: Test failed: expected 1, got 0 metafile.c:8370: Test failed: expected sizeof(RECT), got 0