mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
opusdec: Set at most 64 channels to NONE position
Thanks to Antonio Morales for finding and reporting the issue. Fixes GHSL-2024-116 Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3871 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8037>
This commit is contained in:
parent
537161868f
commit
2838374d6e
1 changed files with 2 additions and 2 deletions
|
@ -440,12 +440,12 @@ gst_opus_dec_parse_header (GstOpusDec * dec, GstBuffer * buf)
|
|||
posn = gst_opus_channel_positions[dec->n_channels - 1];
|
||||
break;
|
||||
default:{
|
||||
gint i;
|
||||
guint i, max_pos = MIN (dec->n_channels, 64);
|
||||
|
||||
GST_ELEMENT_WARNING (GST_ELEMENT (dec), STREAM, DECODE,
|
||||
(NULL), ("Using NONE channel layout for more than 8 channels"));
|
||||
|
||||
for (i = 0; i < dec->n_channels; i++)
|
||||
for (i = 0; i < max_pos; i++)
|
||||
pos[i] = GST_AUDIO_CHANNEL_POSITION_NONE;
|
||||
|
||||
posn = pos;
|
||||
|
|
Loading…
Reference in a new issue