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>
release/6.1
Michael Niedermayer 9 months ago
parent c630e08d41
commit 8d348dc635
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      libavcodec/rv34.c

@ -97,6 +97,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]]++;

Loading…
Cancel
Save