You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/dcadec: Check active_bands
Fixes CID1297594 part2 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1242,8 +1242,13 @@ int ff_dca_xbr_parse_frame(DCAContext *s)
|
|||||||
for(i = 0; i < num_chsets; i++) {
|
for(i = 0; i < num_chsets; i++) {
|
||||||
n_xbr_ch[i] = get_bits(&s->gb, 3) + 1;
|
n_xbr_ch[i] = get_bits(&s->gb, 3) + 1;
|
||||||
k = get_bits(&s->gb, 2) + 5;
|
k = get_bits(&s->gb, 2) + 5;
|
||||||
for(j = 0; j < n_xbr_ch[i]; j++)
|
for(j = 0; j < n_xbr_ch[i]; j++) {
|
||||||
active_bands[i][j] = get_bits(&s->gb, k) + 1;
|
active_bands[i][j] = get_bits(&s->gb, k) + 1;
|
||||||
|
if (active_bands[i][j] > DCA_SUBBANDS) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "too many active subbands (%d)\n", active_bands[i][j]);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* skip to the end of the header */
|
/* skip to the end of the header */
|
||||||
|
Reference in New Issue
Block a user