Message ID | 1502117160-24655-55-git-send-email-armbru@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/qemu-img.c b/qemu-img.c index 3ae5fe3..cf3ef3e 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2838,6 +2838,10 @@ static int img_map(int argc, char **argv) } length = blk_getlength(blk); + if (length < 0) { + error_report("Couldn't get length of image '%s': %s", + filename, strerror(-length)); + } while (curr.start + curr.length < length) { int64_t nsectors_left; int64_t sector_num;
Signed-off-by: Markus Armbruster <armbru@redhat.com> --- qemu-img.c | 4 ++++ 1 file changed, 4 insertions(+)