gdi32: Check pointer in CreateDIBSection (bug 8066)
Nikolay Sivov
bunglehead at gmail.com
Fri May 9 15:07:11 CDT 2008
Changelog:
- CreateDIBSection - check input ptr
---
dlls/gdi32/dib.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c
index 980e0f3..e448eb3 100644
--- a/dlls/gdi32/dib.c
+++ b/dlls/gdi32/dib.c
@@ -1258,6 +1258,10 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
DWORD compression, sizeImage;
void *mapBits = NULL;
+ /* LastError isn't set in this case */
+ if(!bmi)
+ return NULL;
+
if (((bitmap_type = DIB_GetBitmapInfo( &bmi->bmiHeader, &width, &height,
&planes, &bpp, &compression, &sizeImage )) == -1))
return 0;
--
1.4.4.4
More information about the wine-patches
mailing list