Skip to content

Commit 9df758d

Browse files
Colin Ian Kingrafaeljw
authored andcommitted
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 <[email protected]> Signed-off-by: Erik Schmauss <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 0e8f62e commit 9df758d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/acpica/rsdump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ static void acpi_rs_out_title(const char *title)
539539

540540
static void acpi_rs_dump_byte_list(u16 length, u8 * data)
541541
{
542-
u8 i;
542+
u16 i;
543543

544544
for (i = 0; i < length; i++) {
545545
acpi_os_printf("%25s%2.2X : %2.2X\n", "Byte", i, data[i]);

0 commit comments

Comments
 (0)