ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Sun Oct  3 15:19:06 2021 +0200| [5d0e8fa4bb12312f3d09317be907df4e6613f686] | 
committer: Andreas Rheinhardt

avcodec/vlc: Make assert check more strict

The earlier code allowed callers to use arbitrary values as
symbols_size as long as no symbols were present.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d0e8fa4bb12312f3d09317be907df4e6613f686
---

 libavcodec/vlc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vlc.c b/libavcodec/vlc.c
index f5456f73ce..3aa198a277 100644
--- a/libavcodec/vlc.c
+++ b/libavcodec/vlc.c
@@ -260,7 +260,7 @@ int ff_vlc_init_sparse(VLC *vlc, int nb_bits, int nb_codes,
     if (ret < 0)
         return ret;
 
-    av_assert0(symbols_size <= 2 || !symbols);
+    av_assert0(symbols_size <= 2U);
     j = 0;
 #define COPY(condition)\
     for (int i = 0; i < nb_codes; i++) {                                    \

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to