mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-27 07:56:11 +00:00
s390/ipl: fix off-by-one in update_machine_ipl_properties()
In update_machine_ipl_properties() the array ascii_loadparm needs to hold the 8 char loadparm and a string terminating zero char. Let's increase the size of ascii_loadparm accordingly. Signed-off-by: Halil Pasic <pasic@linux.ibm.com> Fixes: 0a01e082a428 ("s390/ipl: sync back loadparm") Fixes: Coverity CID 1421966 Reported-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200320143101.41764-1-pasic@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
f58f084e71
commit
7722837369
@ -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++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user