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

Showing the changes to libavcodec (1 of 1 file). Show all

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
260 if (ret < 0)260 if (ret < 0)
261 return ret;261 return ret;
262 262
263 av_assert0(symbols_size <= 2 || !symbols);263 av_assert0(symbols_size <= 2U);
264 j = 0;264 j = 0;
265#define COPY(condition)\265#define COPY(condition)\
266 for (int i = 0; i < nb_codes; i++) { \266 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