mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
rtpmp4adepay: prevent out-of-bound array access
This commit is contained in:
parent
3137f26544
commit
a3ea25bc88
1 changed files with 3 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue