Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: d664548 ("s390x/s390-virtio-ccw: fix loadparm property getter") Fixes: Coverity CID 1431058 Reported-by: Peter Maydell <[email protected]> Signed-off-by: Halil Pasic <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-Id: <[email protected]> Signed-off-by: Cornelia Huck <[email protected]>
- Loading branch information