Merge remote-tracking branch 'qatar/master'
* qatar/master:
wmapro: check num_vec_coeffs against the actual available buffer
Conflicts:
libavcodec/wmaprodec.c
The check is replaced by an assert.
See: b21ba20cc8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
a3e9f4c32a
@ -1129,11 +1129,12 @@ static int decode_subframe(WMAProDecodeCtx *s)
|
||||
cur_subwoofer_cutoff = s->subwoofer_cutoffs[s->table_idx];
|
||||
|
||||
/** configure the decoder for the current subframe */
|
||||
offset += s->samples_per_frame >> 1;
|
||||
|
||||
for (i = 0; i < s->channels_for_cur_subframe; i++) {
|
||||
int c = s->channel_indexes_for_cur_subframe[i];
|
||||
|
||||
s->channel[c].coeffs = &s->channel[c].out[(s->samples_per_frame >> 1)
|
||||
+ offset];
|
||||
s->channel[c].coeffs = &s->channel[c].out[offset];
|
||||
}
|
||||
|
||||
s->subframe_len = subframe_len;
|
||||
@ -1189,6 +1190,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
|
||||
av_log(s->avctx, AV_LOG_ERROR, "num_vec_coeffs %d is too large\n", num_vec_coeffs);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
av_assert0(num_vec_coeffs + offset <= FF_ARRAY_ELEMS(s->channel[c].out));
|
||||
s->channel[c].num_vec_coeffs = num_vec_coeffs;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user