Commit 2ffb0598 authored by Vittorio Giovara's avatar Vittorio Giovara

mlpdec: check for negative index

CC: libav-stable@libav.org
Bug-Id: CID 970924
parent 6abe7eda
......@@ -552,7 +552,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
ch_assign = av_get_channel_layout_channel_index(s->ch_layout,
channel);
}
if (ch_assign > s->max_matrix_channel) {
if (ch_assign < 0 || ch_assign > s->max_matrix_channel) {
avpriv_request_sample(m->avctx,
"Assignment of matrix channel %d to invalid output channel %d",
ch, ch_assign);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment