acpi: Fix an infinite loop in acpi_table_add
PATCH 1/1 acpi: Fix an infinite loop in acpi_table_add
Commit d729bb9a7700e364b1c5f9893d61f07a9e002bce has a typo, causing an infinite loop in acpi_table_add.
Signed-off-by Vincent Minet <[email protected]>
--- hw/acpi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/acpi.c +1 -1
@@ -161,7 +161,7 @@ int acpi_table_add(const char *t)/* off < length is necessary because file size can be changed under our foot */ -while (s.st_size && off < length); { +while (s.st_size && off < length) {int r; r =read (fd, p + off, s.st_size);if (r >0 ) {
Signature · 1 line
1.7.3.1
Quoted 7 lines · Vincent Minet
Commit
d729bb9a7700e364b1c5f9893d61f07a9e002bcehas a typo, causing an infinite loop inacpi_table_add.Signed-off-by Vincent Minet <[email protected]>--- hw/acpi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
OUCH!
Good catch!
Acked-by Jes Sorensen <[email protected]>
Jes
Blue Swirl
AppliedThanks, applied.
Quoted 26 lines · Vincent Minet
Commit
d729bb9a7700e364b1c5f9893d61f07a9e002bcehas a typo, causing an infinite loop inacpi_table_add.Signed-off-by Vincent Minet <[email protected]>---
hw/acpi.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)hw/acpi.c +0
-0@@ -161,7 +161,7 @@ int acpi_table_add(const char *t) /* off < length is necessary because file size can be changedunder our foot */
- while(s.st_size && off < length); {
+ while(s.st_size && off < length) {
int r;
r =read(fd, p + off, s.st_size);
if (r > 0) {
--
1.7.3.1