In update_machine_ipl_properties() the array ascii_loadparm needs to hold the 8 char lodparm and a string terminating zero char.
Let's increase the size of ascii_loadparm accordingly. Signed-off-by: Halil Pasic <pa...@linux.ibm.com> Fixes: 0a01e082a4 ("s390/ipl: sync back loadparm") Reported-by: Peter Maydell <peter.mayd...@linaro.org> --- hw/s390x/ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index b81942e1e6..8c3e019571 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -546,7 +546,7 @@ static void update_machine_ipl_properties(IplParameterBlock *iplb) /* Sync loadparm */ if (iplb->flags & DIAG308_FLAGS_LP_VALID) { uint8_t *ebcdic_loadparm = iplb->loadparm; - char ascii_loadparm[8]; + char ascii_loadparm[9]; int i; for (i = 0; i < 8 && ebcdic_loadparm[i]; i++) { base-commit: 226cd20706e20264c176f8edbaf17d7c9b7ade4a -- 2.17.1