mlpdec: check for negative index

CC: libav-stable@libav.org
Bug-Id: CID 970924
This commit is contained in:
Vittorio Giovara 2014-11-11 17:40:06 +01:00
parent 6abe7edabb
commit 2ffb0598db
1 changed files with 1 additions and 1 deletions

View File

@ -552,7 +552,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
ch_assign = av_get_channel_layout_channel_index(s->ch_layout, ch_assign = av_get_channel_layout_channel_index(s->ch_layout,
channel); channel);
} }
if (ch_assign > s->max_matrix_channel) { if (ch_assign < 0 || ch_assign > s->max_matrix_channel) {
avpriv_request_sample(m->avctx, avpriv_request_sample(m->avctx,
"Assignment of matrix channel %d to invalid output channel %d", "Assignment of matrix channel %d to invalid output channel %d",
ch, ch_assign); ch, ch_assign);