Fixes: CID1516994 Out-of-bounds access Fixes: CID1516996 Out-of-bounds access Fixes: CID1516999 Out-of-bounds access
Unified · Split
| @@ -1123,6 +1123,31 @@ static av_cold int init(AVFilterContext *ctx) · 1122 unmodified lines | |||
| 1123 | s->create_lfe = av_channel_layout_index_from_channel(&s->out_ch_layout, | 1123 | s->create_lfe = av_channel_layout_index_from_channel(&s->out_ch_layout, |
| 1124 | AV_CHAN_LOW_FREQUENCY) >= 0; | 1124 | AV_CHAN_LOW_FREQUENCY) >= 0; |
| 1125 | 1125 | ||
| 1126 | switch (out_channel_layout) { | ||
| 1127 | case AV_CH_LAYOUT_MONO: | ||
| 1128 | case AV_CH_LAYOUT_STEREO: | ||
| 1129 | case AV_CH_LAYOUT_2POINT1: | ||
| 1130 | case AV_CH_LAYOUT_2_1: | ||
| 1131 | case AV_CH_LAYOUT_2_2: | ||
| 1132 | case AV_CH_LAYOUT_SURROUND: | ||
| 1133 | case AV_CH_LAYOUT_3POINT1: | ||
| 1134 | case AV_CH_LAYOUT_QUAD: | ||
| 1135 | case AV_CH_LAYOUT_4POINT0: | ||
| 1136 | case AV_CH_LAYOUT_4POINT1: | ||
| 1137 | case AV_CH_LAYOUT_5POINT0: | ||
| 1138 | case AV_CH_LAYOUT_5POINT1: | ||
| 1139 | case AV_CH_LAYOUT_5POINT0_BACK: | ||
| 1140 | case AV_CH_LAYOUT_5POINT1_BACK: | ||
| 1141 | case AV_CH_LAYOUT_6POINT0: | ||
| 1142 | case AV_CH_LAYOUT_6POINT1: | ||
| 1143 | case AV_CH_LAYOUT_7POINT0: | ||
| 1144 | case AV_CH_LAYOUT_7POINT1: | ||
| 1145 | case AV_CH_LAYOUT_OCTAGONAL: | ||
| 1146 | break; | ||
| 1147 | default: | ||
| 1148 | goto fail; | ||
| 1149 | } | ||
| 1150 | |||
| 1126 | switch (in_channel_layout) { | 1151 | switch (in_channel_layout) { |
| 1127 | case AV_CH_LAYOUT_STEREO: | 1152 | case AV_CH_LAYOUT_STEREO: |
| 1128 | s->filter = filter_stereo; | 1153 | s->filter = filter_stereo; |