Module: wine Branch: master Commit: 44c2db175b9b75254785084ef477cf736352c398 URL: http://source.winehq.org/git/wine.git/?a=commit;h=44c2db175b9b75254785084ef4...
Author: Ken Thomases ken@codeweavers.com Date: Wed Feb 21 10:50:36 2007 -0600
winex11.drv: Pass correct coords into X11DRV_InternalFloodFill.
The (x,y) should be relative to the XImage, not the drawable. The (xOrg,yOrg) is what should be relative to the drawable. This fixes a crash when XGetPixel tried to access memory outside the XImage's buffer.
---
dlls/winex11.drv/graphics.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index d8e5f91..638356b 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -1312,9 +1312,10 @@ X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color, wine_tsx11_lock(); XSetFunction( gdi_display, physDev->gc, GXcopy ); X11DRV_InternalFloodFill(image, physDev, - physDev->dc_rect.left + pt.x - rect.left, - physDev->dc_rect.top + pt.y - rect.top, - rect.left, rect.top, + pt.x - rect.left, + pt.y - rect.top, + physDev->dc_rect.left + rect.left, + physDev->dc_rect.top + rect.top, X11DRV_PALETTE_ToPhysical( physDev, color ), fillType ); wine_tsx11_unlock();