[ros-diffs] [greatlrd] 20415: EngSetPointerShape did not check for
NULL pointer when it alloc memmory.
greatlrd at svn.reactos.org
greatlrd at svn.reactos.org
Thu Dec 29 15:48:18 CET 2005
EngSetPointerShape did not check for NULL pointer when it alloc memmory.
Modified: trunk/reactos/subsys/win32k/eng/mouse.c
_____
Modified: trunk/reactos/subsys/win32k/eng/mouse.c
--- trunk/reactos/subsys/win32k/eng/mouse.c 2005-12-29 08:43:45 UTC
(rev 20414)
+++ trunk/reactos/subsys/win32k/eng/mouse.c 2005-12-29 10:53:01 UTC
(rev 20415)
@@ -389,6 +389,11 @@
PBYTE Bits;
Bits = EngAllocMem(0, psoColor->cjBits, TAG_MOUSE);
+ if (Bits == NULL)
+ {
+ return SPS_ERROR;
+ }
+
memcpy(Bits, psoColor->pvBits, psoColor->cjBits);
pgp->ColorSurface = (HSURF)EngCreateBitmap(pgp->Size,
@@ -407,6 +412,11 @@
Size.cx = pgp->Size.cx;
Size.cy = pgp->Size.cy << 1;
Bits = EngAllocMem(0, psoMask->cjBits, TAG_MOUSE);
+ if (Bits == NULL)
+ {
+ return SPS_ERROR;
+ }
+
memcpy(Bits, psoMask->pvBits, psoMask->cjBits);
pgp->MaskSurface = (HSURF)EngCreateBitmap(Size,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051229/c6765c2e/attachment.html
More information about the Ros-diffs
mailing list