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:
Hermès Bélusca-Maïto 2013-06-18 21:51:43 +00:00
parent 29c077bd2b
commit c4abf0b6cc

View file

@ -23,6 +23,8 @@ IntGdiCreateColorSpace(
HCOLORSPACE hCS;
pCS = COLORSPACEOBJ_AllocCSWithHandle();
if (pCS == NULL) return NULL;
hCS = pCS->BaseObject.hHmgr;
pCS->lcsColorSpace = pLogColorSpace->lcsColorSpace;