qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 11/43] spapr: fix off-by-one error in spapr_ovec_popu


From: David Gibson
Subject: [Qemu-devel] [PULL 11/43] spapr: fix off-by-one error in spapr_ovec_populate_dt()
Date: Wed, 22 Feb 2017 17:33:16 +1100

From: Sam Bobroff <address@hidden>

The last byte of the option vector was missing due to an off-by-one
error. Without this fix, client architecture support negotiation will
fail because the last byte of option vector 5, which contains the MMU
support, will be missed.

Signed-off-by: Sam Bobroff <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
 hw/ppc/spapr_ovec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_ovec.c b/hw/ppc/spapr_ovec.c
index 3eb1d59..0bcf311 100644
--- a/hw/ppc/spapr_ovec.c
+++ b/hw/ppc/spapr_ovec.c
@@ -250,5 +250,5 @@ int spapr_ovec_populate_dt(void *fdt, int fdt_offset,
         }
     }
 
-    return fdt_setprop(fdt, fdt_offset, name, vec, vec_len);
+    return fdt_setprop(fdt, fdt_offset, name, vec, vec_len + 1);
 }
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]