[PATCH] dsddump: fix segfault on type ACPI_TYPE_LOCAL_REFERENCE

Erico Nunes ernunes at redhat.com
Mon Jul 1 14:01:18 UTC 2019


The ACPI_BUFFER on dsddump print_package_element was unitialized and
caused a segfault running on platforms with a _DSD containing
ACPI_TYPE_LOCAL_REFERENCE.

Signed-off-by: Erico Nunes <ernunes at redhat.com>
---
 src/acpi/dsddump/dsddump.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/acpi/dsddump/dsddump.c b/src/acpi/dsddump/dsddump.c
index c4e0610b..c60ba20e 100644
--- a/src/acpi/dsddump/dsddump.c
+++ b/src/acpi/dsddump/dsddump.c
@@ -55,6 +55,9 @@ static void print_package_element(fwts_framework *fw, ACPI_OBJECT *obj)
 	ACPI_STATUS status;
 	ACPI_BUFFER buffer;
 
+	buffer.Length = sizeof(full_name);
+	buffer.Pointer = full_name;
+
 	switch (obj->Type) {
 		case ACPI_TYPE_INTEGER:
 			fwts_log_info_verbatim(fw, "    Value: 0x%8.8" PRIx64, obj->Integer.Value);
-- 
2.20.1




More information about the fwts-devel mailing list