discoverer: Don't print channel layout for more than 64 channels
authorSebastian Dröge <sebastian@centricular.com>
Mon, 30 Sep 2024 15:19:30 +0000 (18:19 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 3 Dec 2024 11:05:12 +0000 (11:05 +0000)
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/8046>

subprojects/gst-plugins-base/tools/gst-discoverer.c

index b042be535d15c4578e35dd5ad6f6fa494fcc0ce9..6028fc71c9d0bccbbcae29a04a5ab77a8beb9066 100644 (file)
@@ -222,7 +222,7 @@ format_channel_mask (GstDiscovererAudioInfo * 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);
 
     for (i = 0; i < channels; i++) {