You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
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.rheinhardt@outlook.com>
This commit is contained in:
@ -260,7 +260,7 @@ int ff_vlc_init_sparse(VLC *vlc, int nb_bits, int nb_codes,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
av_assert0(symbols_size <= 2 || !symbols);
|
av_assert0(symbols_size <= 2U);
|
||||||
j = 0;
|
j = 0;
|
||||||
#define COPY(condition)\
|
#define COPY(condition)\
|
||||||
for (int i = 0; i < nb_codes; i++) { \
|
for (int i = 0; i < nb_codes; i++) { \
|
||||||
|
Reference in New Issue
Block a user