[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-xen-unstable] virtio-blk: initialise unused blkcfg.size_max field



commit 835928ed5d9a707c95e19213e1a201366678cb1c
Author:     Yunlei Ding <yunlei.ding@xxxxxxxxxx>
AuthorDate: Fri Apr 18 06:23:24 2014 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Oct 16 16:52:05 2015 +0100

    virtio-blk: initialise unused blkcfg.size_max field
    
    Newer GCC warns about memcpy()ing uninitialised data.
    
    Signed-off-by: Yunlei Ding <yunlei.ding@xxxxxxxxxx>
    Coverity-ID: 1056088
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 hw/virtio-blk.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 520ad1b..fcf893a 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -252,6 +252,7 @@ static void virtio_blk_update_config(VirtIODevice *vdev, 
uint8_t *config)
     stw_raw(&blkcfg.cylinders, cylinders);
     blkcfg.heads = heads;
     blkcfg.sectors = secs;
+    blkcfg.size_max = 0;
     memcpy(config, &blkcfg, sizeof(blkcfg));
 }
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.