mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +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:
@@ -23,6 +23,8 @@ IntGdiCreateColorSpace(
|
||||
HCOLORSPACE hCS;
|
||||
|
||||
pCS = COLORSPACEOBJ_AllocCSWithHandle();
|
||||
if (pCS == NULL) return NULL;
|
||||
|
||||
hCS = pCS->BaseObject.hHmgr;
|
||||
|
||||
pCS->lcsColorSpace = pLogColorSpace->lcsColorSpace;
|
||||
|
||||
Reference in New Issue
Block a user