mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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:
parent
ef71b6178e
commit
de246c6741
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue