From 47219585d4304c3a1c3742b5e61528875b7a58be Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Tue, 9 Jul 2024 22:40:32 +0200 Subject: [PATCH] Fix pointer operation overflow --- xtoskrnl/hl/acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xtoskrnl/hl/acpi.c b/xtoskrnl/hl/acpi.c index a04a4f1..cd3bb4e 100644 --- a/xtoskrnl/hl/acpi.c +++ b/xtoskrnl/hl/acpi.c @@ -265,7 +265,7 @@ XTAPI XTSTATUS HlpInitializeAcpiSystemInformation(VOID) { - PUCHAR MadtTable; + ULONG_PTR MadtTable; PACPI_MADT Madt; XTSTATUS Status; ULONG CpuCount; @@ -282,11 +282,11 @@ HlpInitializeAcpiSystemInformation(VOID) } /* Set APIC table traverse pointer and initialize number of CPUs */ - MadtTable = (PUCHAR)Madt->ApicTables; + MadtTable = (ULONG_PTR)Madt->ApicTables; CpuCount = 0; /* Traverse all MADT tables to get number of processors */ - while(MadtTable <= ((PUCHAR)Madt + Madt->Header.Length)) + while(MadtTable <= ((ULONG_PTR)Madt + Madt->Header.Length)) { /* Check if this is a local APIC subtable */ if((((PACPI_MADT_LOCAL_APIC)MadtTable)->Header.Type == ACPI_MADT_TYPE_LOCAL_APIC) &&