Fix a problem introduced in a recent fix.
-----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEw9DWbcNiT/aowBjO3s9rk8bwL68FAl8j21QSHGNvaHVja0By ZWRoYXQuY29tAAoJEN7Pa5PG8C+vSmsP/RPTakpLdYcBFuXcVHYivloRWWuFyiFR X4EkjuybJYmAXEWFhg0tFAdjqf/u9f9GIDoFlTreMm+qknh49TgYtT/HcemnR2lL lp6Tgv3Z7mw6ZD0dHm+hn9IjFegEaAB5ucehV3fxBxXgamdUKeOKx9z8fMlorsQW fxmLupeeBzc+IJgaY7UG1ZwY0aJ0vQ7u2PjDVnRu6HXUVHQaSDUlSVzzr/0I/Drl IMGsOJdnlrytVvNG/UvuXTpCvIbvbfPpNM9kB+CzgSrYi4nO3l0wC1d+OA+lVPur ypK7qmP4d9QX9iU4vw26ZajjjXLv1kSoTQcAJc3Lm5u3uoUe9QAmM62Vz3HJx1C7 Y74mjBVTscKhWzurvGGseTLg06r4IDyNAffh+iZYYlX6FFKuEORLpbyaf3+SpS/e hTndK7kvX3lvd0BpaFAp+qTug2kQy0Z/zTtsnuxDhGFLJiddYbqSX3HnK1OGwO4h hbojjqc+SSCTOq2dx3nFSzUZm4AeJVb5ZudW4uw0jGZAnNIHYsAeS/pPDSo8vo2H 3SvFU5vmNY7pyFGMUMN6PEDd7MAc67YWQytt1Q34CWr13JPT4Cq+RZhoWA0tDH4/ 5TcWfsP3cqqxFsp/f2u023NGDQ6AMm2Sni3rhIfljUHfe2qw0xLvXppJK6D3Pb9q 5pS2WoqG8Tmb =zfTJ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200731' into staging Fix a problem introduced in a recent fix. # gpg: Signature made Fri 31 Jul 2020 09:50:28 BST # gpg: using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF # gpg: issuer "cohuck@redhat.com" # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [marginal] # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full] # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full] # gpg: aka "Cornelia Huck <cohuck@kernel.org>" [marginal] # gpg: aka "Cornelia Huck <cohuck@redhat.com>" [marginal] # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20200731: s390x/s390-virtio-ccw: fix off-by-one in loadparm getter Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
d74824cf7c
@ -701,12 +701,9 @@ bool hpage_1m_allowed(void)
|
|||||||
static char *machine_get_loadparm(Object *obj, Error **errp)
|
static char *machine_get_loadparm(Object *obj, Error **errp)
|
||||||
{
|
{
|
||||||
S390CcwMachineState *ms = S390_CCW_MACHINE(obj);
|
S390CcwMachineState *ms = S390_CCW_MACHINE(obj);
|
||||||
char *loadparm_str;
|
|
||||||
|
|
||||||
/* make a NUL-terminated string */
|
/* make a NUL-terminated string */
|
||||||
loadparm_str = g_memdup(ms->loadparm, sizeof(ms->loadparm) + 1);
|
return g_strndup((char *) ms->loadparm, sizeof(ms->loadparm));
|
||||||
loadparm_str[sizeof(ms->loadparm)] = 0;
|
|
||||||
return loadparm_str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void machine_set_loadparm(Object *obj, const char *val, Error **errp)
|
static void machine_set_loadparm(Object *obj, const char *val, Error **errp)
|
||||||
|
Loading…
Reference in New Issue
Block a user