Alexandre Julliard : winex11: Force unprotecting the DIB section bits in PutImage.

Alexandre Julliard julliard at winehq.org
Wed Jul 27 13:25:26 CDT 2011


Module: wine
Branch: master
Commit: 372ad442fcea463b671af6fb394f0da0936dcfba
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=372ad442fcea463b671af6fb394f0da0936dcfba

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jul 27 12:18:03 2011 +0200

winex11: Force unprotecting the DIB section bits in PutImage.

---

 dlls/winex11.drv/bitblt.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
index ee60ef8..8d2383a 100644
--- a/dlls/winex11.drv/bitblt.c
+++ b/dlls/winex11.drv/bitblt.c
@@ -1919,6 +1919,10 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info
         int height = dst->visrect.bottom - dst->visrect.top;
 
         image->data = dst_bits.ptr;
+        /* hack: make sure the bits are readable if we are reading from a DIB section */
+        /* to be removed once we get rid of DIB access protections */
+        if (!dst_bits.is_copy) IsBadReadPtr( dst_bits.ptr, height * image->bytes_per_line );
+
         if (bitmap)
         {
             RGNDATA *clip_data = NULL;




More information about the wine-cvs mailing list