diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-05-08 23:06:10 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-05-15 10:16:10 +0200 |
commit | 9df758d96df5773eb7f52878f8875f1c989993da (patch) | |
tree | fb985da3345c372aece1927add46d47418ffa985 | |
parent | ACPICA: vsnprintf: this statement may fall through (diff) | |
download | linux-9df758d96df5773eb7f52878f8875f1c989993da.tar.xz linux-9df758d96df5773eb7f52878f8875f1c989993da.zip |
ACPICA: Fix potential infinite loop in acpi_rs_dump_byte_list
There is a potenial infinite loop if acpi_rs_dump_byte_list is
called with a Length greater than 255 since the current loop
counter is just a u8 and will wrap to zero and never reach
the desired value in Length. Fix this by making the loop
counter the size type as Length.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/rsdump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c index b12a0b1cd9ce..6601e71b45e3 100644 --- a/drivers/acpi/acpica/rsdump.c +++ b/drivers/acpi/acpica/rsdump.c @@ -539,7 +539,7 @@ static void acpi_rs_out_title(const char *title) static void acpi_rs_dump_byte_list(u16 length, u8 * data) { - u8 i; + u16 i; for (i = 0; i < length; i++) { acpi_os_printf("%25s%2.2X : %2.2X\n", "Byte", i, data[i]); |