diff options
author | Max Reitz <mreitz@redhat.com> | 2014-05-04 05:31:40 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-05-09 13:32:16 +0200 |
commit | 65f33bc0020112e7be7b8966495cd5efa2d0ab15 (patch) | |
tree | 45cd51192d53cf9f20140c3e9bd253f47ab344e3 /qemu-options.hx | |
parent | 43cbeffb19877c62cbe0aaf08b2f235d98d71340 (diff) | |
download | qemu-65f33bc0020112e7be7b8966495cd5efa2d0ab15.zip qemu-65f33bc0020112e7be7b8966495cd5efa2d0ab15.tar.gz qemu-65f33bc0020112e7be7b8966495cd5efa2d0ab15.tar.bz2 |
qcow2: Fix alloc_clusters_noref() overflow detection
If the very first allocation has a length of 0, the free_cluster_index
is still 0 after the for loop, which means that subtracting one from it
will underflow and signal an invalid range of clusters by returning
-EFBIG. However, there is no such range, as its length is 0.
Fix this by preventing underflows on free_cluster_index during the
check.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qemu-options.hx')
0 files changed, 0 insertions, 0 deletions