History

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.

Andreas Rheinhardt committed 5 years ago

Commit 5d0e8fa1 parent ef58de71 file · +1 −1Browse files

Unified · Split

libavcodec/vlc.c+1−1
@@ -260,7 +260,7 @@ int ff_vlc_init_sparse(VLC *vlc, int nb_bits, int nb_codes, · 259 unmodified lines
260260 if (ret < 0)
261261 return ret;
262262
263− av_assert0(symbols_size <= 2 || !symbols);
263+ av_assert0(symbols_size <= 2U);
264264 j = 0;
265265 #define COPY(condition)\
266266 for (int i = 0; i < nb_codes; i++) { \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t