DRIVER_RegisterDriver did not check for NULL pointer when it alloc
memory.
Modified: trunk/reactos/subsys/win32k/misc/driver.c
_____
Modified: trunk/reactos/subsys/win32k/misc/driver.c
--- trunk/reactos/subsys/win32k/misc/driver.c 2005-12-29 11:20:30 UTC
(rev 20417)
+++ trunk/reactos/subsys/win32k/misc/driver.c 2005-12-29 12:13:02 UTC
(rev 20418)
@@ -54,6 +54,13 @@
Driver->Name = ExAllocatePoolWithTag(PagedPool,
(wcslen(Name) + 1) *
sizeof(WCHAR),
TAG_DRIVER);
+ if (Driver->Name == NULL)
+ {
+ DPRINT1("Out of memory\n");
+ ExFreePool(Driver);
+ return FALSE;
+ }
+
wcscpy(Driver->Name, Name);
Driver->Next = DriverList;
DriverList = Driver;
Show replies by date