]> git.ipfire.org Git - thirdparty/qemu.git/commit
xen/blkif: Avoid double access to src->nr_segments
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 18 Dec 2015 15:09:58 +0000 (15:09 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 15 Mar 2016 17:20:17 +0000 (12:20 -0500)
commit4d59e78dfe6c1df181b54ee90f273de7d4cdfe86
treedbc27ef859eb9b6958ac0d394388a36e832feae1
parent52a7b27947a909286bf7ea13335e8400f8adb4b3
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>
(cherry picked from commit f9e98e5d7a67367b862941e339a98b8322fa0cea)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/block/xen_blkif.h