[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 148d25: s390x/s390-virtio-ccw: fix off-by-one
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 148d25: s390x/s390-virtio-ccw: fix off-by-one in loadparm ... |
Date: |
Fri, 31 Jul 2020 03:30:38 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 148d25e0f6ad1dc3bd6aace092d65262d4217ec6
https://github.com/qemu/qemu/commit/148d25e0f6ad1dc3bd6aace092d65262d4217ec6
Author: Halil Pasic <pasic@linux.ibm.com>
Date: 2020-07-30 (Thu, 30 Jul 2020)
Changed paths:
M hw/s390x/s390-virtio-ccw.c
Log Message:
-----------
s390x/s390-virtio-ccw: fix off-by-one in loadparm getter
As pointed out by Peter, g_memdup(ms->loadparm, sizeof(ms->loadparm) + 1)
reads one past of the end of ms->loadparm, so g_memdup() can not be used
here.
Let's use g_strndup instead!
Fixes: d6645483285f ("s390x/s390-virtio-ccw: fix loadparm property getter")
Fixes: Coverity CID 1431058
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200730130156.35063-1-pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Commit: d74824cf7c8b352f9045e949dc636c7207a41eee
https://github.com/qemu/qemu/commit/d74824cf7c8b352f9045e949dc636c7207a41eee
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2020-07-31 (Fri, 31 Jul 2020)
Changed paths:
M hw/s390x/s390-virtio-ccw.c
Log Message:
-----------
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>
Compare: https://github.com/qemu/qemu/compare/144862975187...d74824cf7c8b
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 148d25: s390x/s390-virtio-ccw: fix off-by-one in loadparm ...,
Peter Maydell <=