[PATCH 3/8] x86: sandbox: Add missing PCI bar to barinfo

Andrew Scull ascull at google.com
Sun Apr 3 12:39:10 CEST 2022


There are expecte to be bars 0 through 5, but the last of these was
missing leading to an read beyond the buffer. Add the missing element
with zero values.

Signed-off-by: Andrew Scull <ascull at google.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Bin Meng <bmeng.cn at gmail.com>
---
 drivers/power/acpi_pmc/pmc_emul.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/acpi_pmc/pmc_emul.c b/drivers/power/acpi_pmc/pmc_emul.c
index a61eb5bd85..8015031da8 100644
--- a/drivers/power/acpi_pmc/pmc_emul.c
+++ b/drivers/power/acpi_pmc/pmc_emul.c
@@ -37,6 +37,7 @@ static struct pci_bar {
 	{ 0, 0 },
 	{ 0, 0 },
 	{ PCI_BASE_ADDRESS_SPACE_IO, 256 },
+	{ 0, 0 },
 };
 
 struct pmc_emul_priv {
-- 
2.35.1.1094.g7c7d902a7c-goog



More information about the U-Boot mailing list