On 01.06.23 21:28, Andrey Drobyshev via wrote:
In case when we're rebasing within one backing chain, and when target image
is larger than old backing file, bdrv_is_allocated_above() ends up setting
*pnum = 0.  As a result, target offset isn't getting incremented, and we
get stuck in an infinite for loop.  Let's detect this case and proceed
further down the loop body, as the offsets beyond the old backing size need
to be explicitly zeroed.

Signed-off-by: Andrey Drobyshev <andrey.drobys...@virtuozzo.com>
---
  qemu-img.c | 13 ++++++++++++-
  1 file changed, 12 insertions(+), 1 deletion(-)

Reviewed-by: Hanna Czenczek <hre...@redhat.com>


Reply via email to