From 119d8d8d2898c2b9efbed56388fd236b5de7d601 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Fri, 23 Nov 2007 07:33:54 +0000 Subject: [PATCH] don't try to alphablend monochrome bitmaps - fixes the red zone overwrite in opera 9.24 svn path=/trunk/; revision=30687 --- reactos/subsystems/win32/win32k/ntuser/cursoricon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c index 40f64a97218..1460c0d85b2 100644 --- a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c +++ b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c @@ -1400,7 +1400,10 @@ UserDrawIconEx( IconSize.cy = bmpMask.bmHeight / 2; } - if (bmpColor.bmBitsPixel == 32) + /* NtGdiCreateCompatibleBitmap will create a monochrome bitmap + when cxWidth or cyHeight is 0 + */ + if ((bmpColor.bmBitsPixel == 32) && (cxWidth != 0) && (cyHeight != 0)) { bAlpha = TRUE; }