InitTimerImpl did not check for NULL pointer when it alloc memory.
Modified: trunk/reactos/subsys/win32k/ntuser/timer.c
_____
Modified: trunk/reactos/subsys/win32k/ntuser/timer.c
--- trunk/reactos/subsys/win32k/ntuser/timer.c 2005-12-29 13:43:25 UTC
(rev 20421)
+++ trunk/reactos/subsys/win32k/ntuser/timer.c 2005-12-29 13:53:35 UTC
(rev 20422)
@@ -181,8 +181,13 @@
ExInitializeFastMutex(&Mutex);
- BitmapBytes = ROUND_UP(NUM_WINDOW_LESS_TIMERS, sizeof(ULONG) * 8) /
8;
+ BitmapBytes = ROUND_UP(NUM_WINDOW_LESS_TIMERS, sizeof(ULONG) * 8) /
8;
WindowLessTimersBitMapBuffer = ExAllocatePoolWithTag(PagedPool,
BitmapBytes, TAG_TIMERBMP);
+ if (WindowLessTimersBitMapBuffer == NULL)
+ {
+ return STATUS_UNSUCCESSFUL;
+ }
+
RtlInitializeBitMap(&WindowLessTimersBitMap,
WindowLessTimersBitMapBuffer,
BitmapBytes * 8);
Show replies by date