mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/vp3: Error out on invalid num_coeffs in unpack_vlcs()
This fixes a hypothetical integer overflow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f2318aee8c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ce46e45f4c
commit
664e3d217a
@ -951,9 +951,11 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
|
||||
Vp3Fragment *all_fragments = s->all_fragments;
|
||||
VLC_TYPE(*vlc_table)[2] = table->table;
|
||||
|
||||
if (num_coeffs < 0)
|
||||
if (num_coeffs < 0) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"Invalid number of coefficents at level %d\n", coeff_index);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (eob_run > num_coeffs) {
|
||||
coeff_i =
|
||||
|
Loading…
Reference in New Issue
Block a user