mirror of
https://github.com/reactos/reactos.git
synced 2025-05-24 03:24:45 +00:00
[WIN32K]
Check for NULL pointer returned by PEN_AllocPenWithHandle before dereferencing the returned pointer (the allocation function can return NULL in low memory conditions, leading to kernel crashes). svn path=/trunk/; revision=59257
This commit is contained in:
parent
99f4087daa
commit
895a9ab679
1 changed files with 4 additions and 1 deletions
|
@ -107,7 +107,10 @@ IntCreateStockPen(DWORD dwPenStyle,
|
|||
ULONG ulColor)
|
||||
{
|
||||
HPEN hPen;
|
||||
PBRUSH pbrushPen = PEN_AllocPenWithHandle();
|
||||
PBRUSH pbrushPen;
|
||||
|
||||
pbrushPen = PEN_AllocPenWithHandle();
|
||||
if (pbrushPen == NULL) return NULL;
|
||||
|
||||
if ((dwPenStyle & PS_STYLE_MASK) == PS_NULL) dwWidth = 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue