[0.11] gst-plugins-good: rtpmp4adepay: prevent out-of-bound array access

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Jan 25 03:50:26 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: a3ea25bc8829fd6d859894be4e22b2afc06583aa
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=a3ea25bc8829fd6d859894be4e22b2afc06583aa

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Fri Jan 20 17:02:15 2012 +0100

rtpmp4adepay: prevent out-of-bound array access

---

 gst/rtp/gstrtpmp4adepay.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gst/rtp/gstrtpmp4adepay.c b/gst/rtp/gstrtpmp4adepay.c
index 103d389..e4343f8 100644
--- a/gst/rtp/gstrtpmp4adepay.c
+++ b/gst/rtp/gstrtpmp4adepay.c
@@ -130,7 +130,7 @@ gst_rtp_mp4a_depay_finalize (GObject * object)
 }
 
 static const guint aac_sample_rates[] = { 96000, 88200, 64000, 48000,
-  44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000
+  44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350
 };
 
 static gboolean
@@ -247,6 +247,8 @@ gst_rtp_mp4a_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
         /* index of 15 means we get the rate in the next 24 bits */
         if (!gst_bit_reader_get_bits_uint32 (&br, &rate, 24))
           goto bad_config;
+      } else if (sr_idx >= G_N_ELEMENTS (aac_sample_rates)) {
+        goto bad_config;
       } else {
         /* else use the rate from the table */
         rate = aac_sample_rates[sr_idx];



More information about the gstreamer-commits mailing list