mirror of
https://github.com/reactos/reactos.git
synced 2025-07-15 18:14:07 +00:00
[WIN32K]
Check for NULL pointer returned by COLORSPACEOBJ_AllocCSWithHandle before dereferencing the returned pointer (the allocation function can return NULL in low memory conditions, leading to kernel crashes). Adapted from a patch from Aleksandar Andrejevic. CORE-7317 #resolve #comment Fixed in revision r59255, cheers :D svn path=/trunk/; revision=59255
This commit is contained in:
parent
29c077bd2b
commit
c4abf0b6cc
1 changed files with 2 additions and 0 deletions
|
@ -23,6 +23,8 @@ IntGdiCreateColorSpace(
|
||||||
HCOLORSPACE hCS;
|
HCOLORSPACE hCS;
|
||||||
|
|
||||||
pCS = COLORSPACEOBJ_AllocCSWithHandle();
|
pCS = COLORSPACEOBJ_AllocCSWithHandle();
|
||||||
|
if (pCS == NULL) return NULL;
|
||||||
|
|
||||||
hCS = pCS->BaseObject.hHmgr;
|
hCS = pCS->BaseObject.hHmgr;
|
||||||
|
|
||||||
pCS->lcsColorSpace = pLogColorSpace->lcsColorSpace;
|
pCS->lcsColorSpace = pLogColorSpace->lcsColorSpace;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue