1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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 e5098589b0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-05-16 04:13:14 +02:00
parent 896af4bd3e
commit 442d18371e
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -98,6 +98,8 @@ static void rv34_gen_vlc(const uint8_t *bits, int size, VLC *vlc, const uint8_t
uint16_t cw[MAX_VLC_SIZE];
int maxbits;
av_assert1(size > 0);
for (int i = 0; i < size; i++)
counts[bits[i]]++;