summaryrefslogtreecommitdiff
path: root/ext/smoothstreaming
diff options
context:
space:
mode:
authorRajat Verma <rajat.verma@st.com>2015-01-07 11:31:30 +0530
committerTim-Philipp Müller <tim@centricular.com>2015-01-07 10:08:20 +0000
commitde246c6741d70077a06ea223297c5ebc57ba471c (patch)
tree7ac6e630e050c86943b3eda828a6f4da3ca0ef0f /ext/smoothstreaming
parentef71b6178ec56c0be9aac600d852f8d259f79760 (diff)
downloadgstreamer-plugins-bad-de246c6741d70077a06ea223297c5ebc57ba471c.tar.gz
mssdemux: fix crash while setting bitrate in caps structure
q->bitrate is a guint64, but G_TYPE_INT may read fewer bits off the stack, and if we pass more then the NULL sentinel may not be found at the right place, which in turn might lead to crashes. https://bugzilla.gnome.org/show_bug.cgi?id=741751
Diffstat (limited to 'ext/smoothstreaming')
-rw-r--r--ext/smoothstreaming/gstmssmanifest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
index 2ee0f3129..7254e4d98 100644
--- a/ext/smoothstreaming/gstmssmanifest.c
+++ b/ext/smoothstreaming/gstmssmanifest.c
@@ -724,7 +724,7 @@ _gst_mss_stream_audio_caps_from_qualitylevel_xml (GstMssStreamQuality * q)
gst_structure_set (structure, "rate", G_TYPE_INT, rate, NULL);
if (q->bitrate)
- gst_structure_set (structure, "bitrate", G_TYPE_INT, q->bitrate, NULL);
+ gst_structure_set (structure, "bitrate", G_TYPE_INT, (int) q->bitrate, NULL);
if (codec_data)
gst_structure_set (structure, "codec_data", GST_TYPE_BUFFER, codec_data,