[NTOS:IO] Do not crash when calling IopLegacyResourceAllocation with NULL ResourceRequirements

This commit is contained in:
Hervé Poussineau 2021-10-30 11:10:08 +02:00
parent 88839d9726
commit 9967d9aa4c

View file

@ -920,6 +920,15 @@ IopLegacyResourceAllocation(IN ARBITER_REQUEST_SOURCE AllocationType,
DPRINT1("IopLegacyResourceAllocation is halfplemented!\n");
if (!ResourceRequirements)
{
/* We can get there by calling IoAssignResources() with RequestedResources = NULL.
* TODO: not sure what we should do, but we shouldn't crash.
* */
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
Status = IopFixupResourceListWithRequirements(ResourceRequirements,
AllocatedResources);
if (!NT_SUCCESS(Status))