Skip to contentSkip to conversation

acpi: Fix an infinite loop in acpi_table_add

PATCH Applied Vincent Minet 3 participants 3 messages Oct 5, 2010 – Oct 9, 2010

lore
Share & tools
lore
#0 lore raw

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.

---
 hw/acpi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/acpi.c +1 -1
index 069e05f..8071e7b 100644
@@ -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
Applied
#2 lore raw
In reply to Vincent Minet

Thanks, applied.

Quoted 26 lines · Vincent Minet

Commit d729bb9a7700e364b1c5f9893d61f07a9e002bce has a typo, causing an infinite loop in acpi_table_add.

---
 hw/acpi.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
hw/acpi.c +0 -0
index 069e05f..8071e7b 100644
@@ -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) {
--
1.7.3.1