On Thu 09 Aug 2018 11:35:01 PM CEST, Max Reitz wrote:
> @@ -295,11 +296,13 @@ static int qcow_open(BlockDriverState *bs, QDict 
> *options, int flags,
>              goto fail;
>          }
>          ret = bdrv_pread(bs->file, header.backing_file_offset,
> -                   bs->backing_file, len);
> +                   bs->auto_backing_file, len);
>          if (ret < 0) {
>              goto fail;
>          }
> -        bs->backing_file[len] = '\0';
> +        bs->auto_backing_file[len] = '\0';
> +        pstrcpy(bs->backing_file, sizeof(bs->backing_file),
> +                bs->auto_backing_file);
>      }

The patch looks fine, I just wonder why you don't simply copy
bs->backing_file into bs->auto_backing_file instead of the other way
around, it would make the patch smaller.

Either way,

Reviewed-by: Alberto Garcia <be...@igalia.com>

Berto

Reply via email to