avcodec/rv34: assert that size is not 0 in rv34_gen_vlc_ext()
Helps: CID1548380 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e5098589b0ca74b3f52e09bae277306a1fc0cd43) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7a73598b3f
commit
956f4cc431
@ -97,6 +97,8 @@ static av_cold void rv34_gen_vlc_ext(const uint8_t *bits, int size, VLC *vlc,
|
||||
uint16_t cw[MAX_VLC_SIZE];
|
||||
int maxbits;
|
||||
|
||||
av_assert1(size > 0);
|
||||
|
||||
for (int i = 0; i < size; i++)
|
||||
counts[bits[i]]++;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user