From d2f2ef3a8fdb729f771e0512efa0b61b4b2287d3 Mon Sep 17 00:00:00 2001 From: Magliano Andrea Date: Tue, 1 Mar 2011 08:42:05 +0100 Subject: [PATCH] Don't leave Value32 uinitialized (as it's not completely filled) OsdHardware.c:AcpiOsReadPort() casts Value to (u_int8_t *) resp. (u_int16_t *) when assigning, thus leaving the upper region of Value32 untouched. If Value32 isn't initialized, random data remains trashing the whole value. Without this every bus_space_read_[12] is virtually screwed up. --- sys/contrib/dev/acpica-unix/executer/exregion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/dev/acpica-unix/executer/exregion.c b/sys/contrib/dev/acpica-unix/executer/exregion.c index 2a308dbeee..75e3a85cea 100644 --- a/sys/contrib/dev/acpica-unix/executer/exregion.c +++ b/sys/contrib/dev/acpica-unix/executer/exregion.c @@ -388,7 +388,7 @@ AcpiExSystemIoSpaceHandler ( void *RegionContext) { ACPI_STATUS Status = AE_OK; - UINT32 Value32; + UINT32 Value32 = 0; ACPI_FUNCTION_TRACE (ExSystemIoSpaceHandler); -- 2.41.0