Message ID | CAPYw7P5ixQfU9oOUKSHaXigR7Um36_zZpfHDSGSMv8Q_EAqQ5Q@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avcodec/vlc: multi vlc fix | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Sun, Sep 17, 2023 at 10:39:21AM +0200, Paul B Mahol wrote: > Attached. > vlc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > d870bba425f718274648fad97b10f71d1698b543 0001-avcodec-vlc-add-correct-upper-limit-for-recursive-fu.patch > From 1bd41c73a9113fd99c4f920dd9493fab258c6a84 Mon Sep 17 00:00:00 2001 > From: Paul B Mahol <onemda@gmail.com> > Date: Sun, 17 Sep 2023 10:29:34 +0200 > Subject: [PATCH] avcodec/vlc: add correct upper limit for recursive function > > Signed-off-by: Paul B Mahol <onemda@gmail.com> > --- > libavcodec/vlc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks! [...]
From 1bd41c73a9113fd99c4f920dd9493fab258c6a84 Mon Sep 17 00:00:00 2001 From: Paul B Mahol <onemda@gmail.com> Date: Sun, 17 Sep 2023 10:29:34 +0200 Subject: [PATCH] avcodec/vlc: add correct upper limit for recursive function Signed-off-by: Paul B Mahol <onemda@gmail.com> --- libavcodec/vlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vlc.c b/libavcodec/vlc.c index b353d2e86c..3b66c94354 100644 --- a/libavcodec/vlc.c +++ b/libavcodec/vlc.c @@ -419,7 +419,7 @@ static int vlc_multi_gen(VLC_MULTI_ELEM *table, const VLC *single, } add_level(table, nb_elems, nb_codes, numbits, buf, - 0, 0, numbits, 0, minbits, max, count, &info); + 0, 0, FFMIN(maxbits, numbits), 0, minbits, max, count, &info); av_log(NULL, AV_LOG_DEBUG, "Joint: %d/%d/%d/%d/%d codes min=%ubits max=%u\n", count[0], count[1], count[2], count[3], count[4], minbits, max); -- 2.42.0