]> xenbits.xensource.com Git - qemu-upstream-4.2-testing.git/commit
xen/blkif: Avoid double access to src->nr_segments
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 18 Dec 2015 15:44:58 +0000 (15:44 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 18 Dec 2015 16:00:32 +0000 (16:00 +0000)
commit74fab2ef4c0ba42af477e9e445c9883cc45cf9e6
treef4ccaf9784b6725c647f9828a07e0a6778811ad6
parentc17e602ae64fb24405ebd256679ba9a6f5819086
xen/blkif: Avoid double access to src->nr_segments

src is stored in shared memory and src->nr_segments is dereferenced
twice at the end of the function.  If a compiler decides to compile this
into two separate memory accesses then the size limitation could be
bypassed.

Fix it by removing the double access to src->nr_segments.

This is part of XSA-155.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xen_blkif.h