[WDMAUD]
[reactos.git] / reactos / drivers / wdm / audio / backpln / portcls / undoc.cpp
index f9c60a3..5e90841 100644 (file)
@@ -90,6 +90,13 @@ PcHandlePropertyWithTable(
 
             Node = (PPCNODE_DESCRIPTOR)((ULONG_PTR)SubDeviceDescriptor->DeviceDescriptor->Nodes + (Property->NodeId * SubDeviceDescriptor->DeviceDescriptor->NodeSize));
 
+            if (!Node->AutomationTable)
+            {
+                // request is out of bounds
+                Irp->IoStatus.Information = 0;
+                return STATUS_INVALID_PARAMETER;
+            }
+
             PC_ASSERT(Node->AutomationTable);
             PC_ASSERT(Node->AutomationTable->PropertyCount);
             PC_ASSERT(Node->AutomationTable->PropertyItemSize);
@@ -126,6 +133,13 @@ PcHandlePropertyWithTable(
 
             Node = (PPCNODE_DESCRIPTOR)((ULONG_PTR)SubDeviceDescriptor->DeviceDescriptor->Nodes + (Property->NodeId * SubDeviceDescriptor->DeviceDescriptor->NodeSize));
 
+            if (!Node->AutomationTable)
+            {
+                // request is out of bounds
+                Irp->IoStatus.Information = 0;
+                return STATUS_INVALID_PARAMETER;
+            }
+
             PC_ASSERT(Node->AutomationTable);
             PC_ASSERT(Node->AutomationTable->PropertyCount);
             PC_ASSERT(Node->AutomationTable->PropertyItemSize);