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

This commit is contained in:
Hervé Poussineau
2021-11-01 18:16:25 +01:00
parent 88839d9726
commit 9967d9aa4c
+9
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))