discoverer: Don't print channel layout for more than 64 channels

64+ channels are always unpositioned / unknown layout.

Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-248
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3864

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8034>
This commit is contained in:
Sebastian Dröge 2024-09-30 18:19:30 +03:00 committed by GStreamer Marge Bot
parent e633ec6428
commit aa07d94c10

View file

@ -222,7 +222,7 @@ format_channel_mask (GstDiscovererAudioInfo * ainfo)
channel_mask = gst_discoverer_audio_info_get_channel_mask (ainfo); channel_mask = gst_discoverer_audio_info_get_channel_mask (ainfo);
if (channel_mask != 0) { if (channel_mask != 0 && channels <= 64) {
gst_audio_channel_positions_from_mask (channels, channel_mask, position); gst_audio_channel_positions_from_mask (channels, channel_mask, position);
for (i = 0; i < channels; i++) { for (i = 0; i < channels; i++) {