[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] block/qcow2-threads: fix qcow2_decompress
From: |
Alberto Garcia |
Subject: |
Re: [PATCH] block/qcow2-threads: fix qcow2_decompress |
Date: |
Mon, 02 Mar 2020 18:04:17 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Mon 02 Mar 2020 04:09:30 PM CET, Vladimir Sementsov-Ogievskiy wrote:
> On success path we return what inflate() returns instead of 0. And it
> most probably works for Z_STREAM_END as it is positive, but is
> definitely broken for Z_BUF_ERROR.
>
> While being here, switch to errno return code, to be closer to
> qcow2_compress API (and usual expectations).
>
> Revert condition in if to be more positive. Drop dead initialization of
> ret.
>
> Cc: address@hidden # v4.0
> Fixes: 341926ab83e2b
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Berto