On 04.07.2014 17:55, Kevin Wolf wrote:
If a qcow2 image has a shorter backing file and a read request to
unallocated clusters goes across EOF of the backing file, the backing
file sees a shortened request and the rest is filled with zeros.
However, the original too long qiov was used with the shortened request.

This patch makes the qiov size match the request size, avoiding a
potential buffer overflow in raw-posix.

Signed-off-by: Kevin Wolf <kw...@redhat.com>
---
  block/qcow2.c | 11 ++++++++++-
  1 file changed, 10 insertions(+), 1 deletion(-)

Reviewed-by: Max Reitz <mre...@redhat.com>

Reply via email to