https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8f36dee6ff56c285c2a98…
commit 8f36dee6ff56c285c2a98dbe49d630a467a72d94
Author: Dmitry Borisov <di.sean(a)protonmail.com>
AuthorDate: Thu Mar 4 18:47:16 2021 +0600
Commit: Dmitry Borisov <di.sean(a)protonmail.com>
CommitDate: Sun Jun 20 19:24:25 2021 +0600
[ISAPNP] Properly count descriptors
Fixes random pool corruptions
---
drivers/bus/isapnp/isapnp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/isapnp/isapnp.c b/drivers/bus/isapnp/isapnp.c
index aa0ae2b6433..daa53f64758 100644
--- a/drivers/bus/isapnp/isapnp.c
+++ b/drivers/bus/isapnp/isapnp.c
@@ -241,7 +241,7 @@ IsaPnpCreateLogicalDeviceResources(
for (i = 0; i < RTL_NUMBER_OF(LogDev->Io); i++)
{
if (!LogDev->Io[i].CurrentBase)
- continue;
+ break;
Descriptor =
&ResourceList->List[0].PartialResourceList.PartialDescriptors[ResourceCount++];
Descriptor->Type = CmResourceTypePort;
@@ -256,7 +256,7 @@ IsaPnpCreateLogicalDeviceResources(
for (i = 0; i < RTL_NUMBER_OF(LogDev->Irq); i++)
{
if (!LogDev->Irq[i].CurrentNo)
- continue;
+ break;
Descriptor =
&ResourceList->List[0].PartialResourceList.PartialDescriptors[ResourceCount++];
Descriptor->Type = CmResourceTypeInterrupt;
@@ -272,7 +272,7 @@ IsaPnpCreateLogicalDeviceResources(
for (i = 0; i < RTL_NUMBER_OF(LogDev->Dma); i++)
{
if (LogDev->Dma[i].CurrentChannel == 4)
- continue;
+ break;
Descriptor =
&ResourceList->List[0].PartialResourceList.PartialDescriptors[ResourceCount++];
Descriptor->Type = CmResourceTypeDma;