]> git.dujemihanovic.xyz Git - u-boot.git/commit
acpi_table: Fix coverity defect in acpi_write_spcr
authorPatrick Rudolph <patrick.rudolph@9elements.com>
Wed, 30 Oct 2024 13:11:46 +0000 (14:11 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 1 Nov 2024 19:33:57 +0000 (13:33 -0600)
commit99ce74a41baede05b20639f3839588b3a9678df8
treeb89555bef3230ba608e99df7de7499f9a648a540
parente61ea9f2e5d2967826c2c6e3edba961064fbbaa1
acpi_table: Fix coverity defect in acpi_write_spcr

Fix "Integer handling issues  (SIGN_EXTENSION)" in newly added code:
Cast serial_info.reg_offset to u64 to prevent an integer overflow when
shifted too many bits to the left. Currently this never happens as the
shift is supposed to be less than 4.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
lib/acpi/acpi_table.c