rtp: fix static array overruns
Yes array[10] has elements from 0...9.
This commit is contained in:
parent
aff7701f80
commit
5792d3b9c0
@ -716,7 +716,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||||||
guint qt;
|
guint qt;
|
||||||
|
|
||||||
qt = info[i].qt;
|
qt = info[i].qt;
|
||||||
if (qt > 15)
|
if (qt > 14)
|
||||||
goto invalid_quant;
|
goto invalid_quant;
|
||||||
|
|
||||||
qsize = tables[qt].size;
|
qsize = tables[qt].size;
|
||||||
|
@ -229,7 +229,7 @@ gst_rtp_mp4a_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||||||
|
|
||||||
if (!gst_bit_reader_get_bits_uint8 (&br, &sr_idx, 4))
|
if (!gst_bit_reader_get_bits_uint8 (&br, &sr_idx, 4))
|
||||||
goto bad_config;
|
goto bad_config;
|
||||||
if (sr_idx > 12 && sr_idx != 15) {
|
if (sr_idx > 11 && sr_idx != 15) {
|
||||||
GST_WARNING_OBJECT (depayload, "invalid sample rate index %d", sr_idx);
|
GST_WARNING_OBJECT (depayload, "invalid sample rate index %d", sr_idx);
|
||||||
goto bad_config;
|
goto bad_config;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ static const gint frame_size[16] = {
|
|||||||
static gint
|
static gint
|
||||||
get_frame_len (GstRtpQCELPDepay * depay, guint8 frame_type)
|
get_frame_len (GstRtpQCELPDepay * depay, guint8 frame_type)
|
||||||
{
|
{
|
||||||
if (frame_type > 16)
|
if (frame_type > 15)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return frame_size[frame_type];
|
return frame_size[frame_type];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user