Message ID | 20190701140118.25282-1-ernunes@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | dsddump: fix segfault on type ACPI_TYPE_LOCAL_REFERENCE | expand |
On 01/07/2019 15:01, Erico Nunes wrote: > 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@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); > Thanks for the fix. Acked-by: Colin Ian King <colin.king@canonical.com>
On 2019-07-01 7:01 a.m., Erico Nunes wrote: > 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@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); > Acked-by: Alex Hung <alex.hung@canonical.com>
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);
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@redhat.com> --- src/acpi/dsddump/dsddump.c | 3 +++ 1 file changed, 3 insertions(+)