- Add a null-check to the IopLoadServiceModule.

- Add a DPRINT1 saying about the possible memory-overwrite bug. This is a hack to get a bootable tree, but still have a note when The Bug happens (look for 'weird' in the debug log).

svn path=/trunk/; revision=24777
This commit is contained in:
Aleksey Bragin 2006-11-19 17:22:18 +00:00
parent a24ea27b47
commit c157acf875
2 changed files with 8 additions and 0 deletions

View file

@ -391,6 +391,10 @@ IopLoadServiceModule(
DPRINT("IopLoadServiceModule(%wZ, 0x%p)\n", ServiceName, ModuleObject);
/* FIXME: This check may be removed once the bug is fixed */
if (ServiceName->Buffer == NULL)
return STATUS_UNSUCCESSFUL;
/*
* Get information about the service.
*/

View file

@ -2321,6 +2321,10 @@ IopActionInitChildServices(PDEVICE_NODE DeviceNode,
PLDR_DATA_TABLE_ENTRY ModuleObject;
PDRIVER_OBJECT DriverObject;
/* FIXME: Remove this once the bug is fixed */
if (DeviceNode->ServiceName.Buffer == NULL)
DPRINT1("Weird DeviceNode %p having ServiceName->Buffer==NULL. Probable stack corruption or memory overwrite.\n", DeviceNode);
Status = IopLoadServiceModule(&DeviceNode->ServiceName, &ModuleObject);
if (NT_SUCCESS(Status) || Status == STATUS_IMAGE_ALREADY_LOADED)
{