The Saturday 16 Aug 2014 à 20:54:17 (+0200), Max Reitz wrote :
> bdrv_is_allocated() may report zero clusters which most probably means
> the image (file) is shorter than expected. Respect this case in order to
> avoid an infinite loop.
>
> Signed-off-by: Max Reitz
> ---
> qemu-io-cmds.c | 5 +++
The Saturday 11 Oct 2014 à 11:53:40 (+0200), Max Reitz wrote :
> Am 10.10.2014 um 14:03 schrieb Benoît Canet:
> >>+} else if (!num) {
> >>+error_report("Unexpected end of image");
> >>+return 0;
> >I think this test can miss some case of Unexpected end of image.
> >
Am 10.10.2014 um 14:03 schrieb Benoît Canet:
+} else if (!num) {
+error_report("Unexpected end of image");
+return 0;
I think this test can miss some case of Unexpected end of image.
For example supose that in map_is_allocated the first bdrv_is_allocated
actually
> +} else if (!num) {
> +error_report("Unexpected end of image");
> +return 0;
I think this test can miss some case of Unexpected end of image.
For example supose that in map_is_allocated the first bdrv_is_allocated
actually succeed then *pnum = num. Then the botto
On 08/16/2014 12:54 PM, Max Reitz wrote:
> bdrv_is_allocated() may report zero clusters which most probably means
> the image (file) is shorter than expected. Respect this case in order to
> avoid an infinite loop.
>
> Signed-off-by: Max Reitz
> ---
> qemu-io-cmds.c | 5 -
> 1 file changed,
bdrv_is_allocated() may report zero clusters which most probably means
the image (file) is shorter than expected. Respect this case in order to
avoid an infinite loop.
Signed-off-by: Max Reitz
---
qemu-io-cmds.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/qemu-io-cmds