vorbisdec: Set at most 64 channels to NONE position
authorSebastian Dröge <sebastian@centricular.com>
Mon, 30 Sep 2024 18:35:07 +0000 (21:35 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 3 Dec 2024 05:43:27 +0000 (05:43 +0000)
Thanks to Antonio Morales for finding and reporting the issue.

Fixes GHSL-2024-115
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3869

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8047>

subprojects/gst-plugins-base/ext/vorbis/gstvorbisdec.c

index 6a410ed858ca398279c02bb95afb4203bc6e5199..1fc4fa883e68e4908431e983de51f58923cb9427 100644 (file)
@@ -204,7 +204,7 @@ vorbis_handle_identification_packet (GstVorbisDec * vd)
     }
     default:{
       GstAudioChannelPosition position[64];
-      gint i, max_pos = MAX (vd->vi.channels, 64);
+      gint i, max_pos = MIN (vd->vi.channels, 64);
 
       GST_ELEMENT_WARNING (vd, STREAM, DECODE,
           (NULL), ("Using NONE channel layout for more than 8 channels"));