https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9967d9aa4ce982308d7d9…
commit 9967d9aa4ce982308d7d9c00a6677313a5c1c9fa
Author:     Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sat Oct 30 11:10:08 2021 +0200
Commit:     Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon Nov 1 18:16:25 2021 +0100
    [NTOS:IO] Do not crash when calling IopLegacyResourceAllocation with NULL
ResourceRequirements
---
 ntoskrnl/io/iomgr/iorsrce.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/ntoskrnl/io/iomgr/iorsrce.c b/ntoskrnl/io/iomgr/iorsrce.c
index 728832b1fca..d3e1abf3039 100644
--- a/ntoskrnl/io/iomgr/iorsrce.c
+++ b/ntoskrnl/io/iomgr/iorsrce.c
@@ -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))