diff mbox series

[FFmpeg-devel] Fix wavpack decoding regression

Message ID CAPYw7P5NXPDsi_P2Fz2NNwgS7hBPFuKo+OiA=NCCpdACMWpPYw@mail.gmail.com
State New
Headers show
Series [FFmpeg-devel] Fix wavpack decoding regression | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Paul B Mahol Aug. 23, 2022, 8:52 p.m. UTC
Patch attached.

Comments

Andreas Rheinhardt Aug. 23, 2022, 9:22 p.m. UTC | #1
Paul B Mahol:
> Patch attached.
> From 217f31c5eb9355bb8fc61a9f46595ee06628c8b9 Mon Sep 17 00:00:00 2001
> From: Paul B Mahol <onemda@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@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;
>          }
Paul B Mahol Aug. 23, 2022, 9:44 p.m. UTC | #2
Better fix attached.
Paul B Mahol Aug. 24, 2022, 1:32 p.m. UTC | #3
will apply soon
diff mbox series

Patch

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

Signed-off-by: Paul B Mahol <onemda@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) {
             av_log(ctx->avctx, AV_LOG_ERROR, "k %d is too large\n", add);
             goto error;
         }
-- 
2.37.2