From 2e3507e05d8dddc4630a2c147c40825f3326787c Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Thu, 28 Sep 2006 19:08:07 +0000 Subject: [PATCH] NtGdiCreateDIBitmap fixed 2 more hiden bugs (cause some crash/bsod) but not the bug I am searching for. svn path=/trunk/; revision=24288 --- reactos/subsystems/win32/win32k/objects/dibobj.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/objects/dibobj.c b/reactos/subsystems/win32/win32k/objects/dibobj.c index 18b2eff6058..ca3eaa4d891 100644 --- a/reactos/subsystems/win32/win32k/objects/dibobj.c +++ b/reactos/subsystems/win32/win32k/objects/dibobj.c @@ -793,7 +793,16 @@ HBITMAP STDCALL NtGdiCreateDIBitmap(HDC hDc, const BITMAPINFOHEADER *Header, PDC Dc; HBITMAP Bmp; - + if (Header == NULL) + { + return NULL; + } + + if (Header->biSize == 0) + { + return NULL; + } + if (NULL == hDc) { BITMAPINFOHEADER *change_Header = (BITMAPINFOHEADER *)Header;