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
This commit is contained in:
Rajat Verma 2015-01-07 11:31:30 +05:30 committed by Tim-Philipp Müller
parent ef71b6178e
commit de246c6741

View file

@ -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,