On 24/04/2024 5:34 pm, Daniel P. Smith wrote:
> Signed-off-by: Daniel P. Smith <dpsm...@apertussolutions.com>

Acked-by: Andrew Cooper <andrew.coop...@citrix.com>

> diff --git a/xen/common/gzip/inflate.c b/xen/common/gzip/inflate.c
> index bec8801df487..8da14880cfbe 100644
> --- a/xen/common/gzip/inflate.c
> +++ b/xen/common/gzip/inflate.c
> @@ -1017,8 +1014,8 @@ static int __init inflate(struct gunzip_state *s)
>      /* Undo too much lookahead. The next read will be byte aligned so we
>       * can discard unused bits in the last meaningful byte.
>       */
> -    while (bk >= 8) {
> -        bk -= 8;
> +    while (s->bk >= 8) {
> +        s->bk -= 8;
>          s->inptr--;
>      }

Isn't it just me, but isn't this just:

    s->inptr -= (s->bk >> 3);
    s->bk &= 7;

?

~Andrew

Reply via email to