From 038f1981293dcbd34afc1da6303f2c21b0f0f294 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 30 Sep 2019 16:24:56 +0100 Subject: [PATCH] arch: acpi: Fix off-by-one error in size of PCI device region When comparing offsets it is necessry to increment by one to give the appropriate size. Signed-off-by: Rob Bradford --- arch/src/x86_64/acpi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/src/x86_64/acpi.rs b/arch/src/x86_64/acpi.rs index 60e54ccd0..5968af3e5 100644 --- a/arch/src/x86_64/acpi.rs +++ b/arch/src/x86_64/acpi.rs @@ -163,7 +163,7 @@ pub fn create_dsdt_table( pci_dsdt_data[200..208].copy_from_slice(&(start_of_device_area.0).to_le_bytes()); pci_dsdt_data[208..216].copy_from_slice(&end_of_device_area.0.to_le_bytes()); pci_dsdt_data[224..232].copy_from_slice( - &(end_of_device_area.unchecked_offset_from(start_of_device_area)).to_le_bytes(), + &(end_of_device_area.unchecked_offset_from(start_of_device_area) + 1).to_le_bytes(), ); /*