diff mbox series

[FFmpeg-devel,8/9] Revert "avcodec/vlc: fix off by one in limit check for multi"

Message ID 20231022215113.3469-8-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/9] avcodec/vlc: merge lost 16bit end of array check | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer Oct. 22, 2023, 9:51 p.m. UTC
This with the last revert results in a table with additional entries

This reverts commit b23eaf968e375f2d38865d90a788221caead3324.
---
 libavcodec/vlc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/vlc.c b/libavcodec/vlc.c
index 79544006677..ceabeba5408 100644
--- a/libavcodec/vlc.c
+++ b/libavcodec/vlc.c
@@ -365,7 +365,7 @@  static void add_level(VLC_MULTI_ELEM *table, const int is16bit,
             uint32_t code;
 
             sym = buf[i].symbol;
-            if (l >= curlimit)
+            if (l > curlimit)
                 return;
             code = curcode + (buf[i].code >> curlen);
             newlimit = curlimit - l;