From de246c6741d70077a06ea223297c5ebc57ba471c Mon Sep 17 00:00:00 2001 From: Rajat Verma Date: Wed, 7 Jan 2015 11:31:30 +0530 Subject: [PATCH] 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 --- ext/smoothstreaming/gstmssmanifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c index 2ee0f3129b..7254e4d985 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,