Skip to content
Commit 48fdfeba authored by Max Reitz's avatar Max Reitz Committed by Michael Roth
Browse files

block/curl: Do not wait for data beyond EOF



libcurl will only give us as much data as there is, not more. The block
layer will deny requests beyond the end of file for us; but since this
block driver is still using a sector-based interface, we can still get
in trouble if the file size is not a multiple of 512.

While we have already made sure not to attempt transfers beyond the end
of the file, we are currently still trying to receive data from there if
the original request exceeds the file size. This patch fixes this issue
and invokes qemu_iovec_memset() on the iovec's tail.

Cc: qemu-stable@nongnu.org
Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Message-id: 20161025025431.24714-5-mreitz@redhat.com
Signed-off-by: default avatarJeff Cody <jcody@redhat.com>
(cherry picked from commit 4e504535)
Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent 6eb194dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment