From: Sam Bobroff Date: Tue, 7 Feb 2017 02:56:44 +0000 (+1100) Subject: spapr: fix off-by-one error in spapr_ovec_populate_dt() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fe93e3e6ec1b1bf4a4c9d4bf55f8776318da6847;p=qemu.git spapr: fix off-by-one error in spapr_ovec_populate_dt() 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 Reviewed-by: Thomas Huth Reviewed-by: Michael Roth Signed-off-by: David Gibson --- diff --git a/hw/ppc/spapr_ovec.c b/hw/ppc/spapr_ovec.c index 3eb1d5976f..0bcf311f8b 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); }