HomeFreeBSD

acpi_spmc: fix revision check reading name as integer

Description

acpi_spmc: fix revision check reading name as integer

In acpi_spmc_get_constraints_spec(), the revision of the device
constraint detail package was mistakenly read from
constraint_obj->Package.Elements[0], which is the device name
(a string), instead of from the detail sub-package's first element.

Move the initialisation of 'detail' before the revision check and
read the revision from detail->Package.Elements[0] as the comment
already states

Approved by: obiwac
Differential Revision: https://reviews.freebsd.org/D55639
Sponsored by: Netflix

Details

Provenance
olivierAuthored on Tue, Mar 3, 11:05 PM
Differential Revision
D55639: Fixing
Parents
rGf268f95955f5: libutil: avoid an out-of-bounds read in trimdomain(3)
Branches
Unknown
Tags
Unknown