[FFmpeg-devel] [PATCH] Fix wavpack decoding regression

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Wed Aug 24 00:22:36 EEST 2022


Paul B Mahol:
> Patch attached.
> From 217f31c5eb9355bb8fc61a9f46595ee06628c8b9 Mon Sep 17 00:00:00 2001
> From: Paul B Mahol <onemda at gmail.com>
> Date: Tue, 23 Aug 2022 22:39:41 +0200
> Subject: [PATCH] avcodec/wavpack: unbreak regression in decoding
> 

You should mention the commit that introduced the regression.

> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavcodec/wavpack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
> index c12e1d6ec6..8ab195cc10 100644
> --- a/libavcodec/wavpack.c
> +++ b/libavcodec/wavpack.c
> @@ -266,7 +266,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
>          INC_MED(2);
>      }
>      if (!c->error_limit) {
> -        if (add >= 0x2000000U) {
> +        if (add >= 0x20000000U) {

You should explain why this is safe.

>              av_log(ctx->avctx, AV_LOG_ERROR, "k %d is too large\n", add);
>              goto error;
>          }



More information about the ffmpeg-devel mailing list