mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-11 06:11:27 +00:00
qtdemux: Fix memory leak for corrupted file
Free brands before overriding them. https://bugzilla.gnome.org/show_bug.cgi?id=756226
This commit is contained in:
parent
4000d97a81
commit
b26ce7ba6d
1 changed files with 2 additions and 0 deletions
|
@ -2377,6 +2377,8 @@ qtdemux_parse_ftyp (GstQTDemux * qtdemux, const guint8 * buffer, gint length)
|
|||
qtdemux->major_brand = QT_FOURCC (buffer + 8);
|
||||
GST_DEBUG_OBJECT (qtdemux, "major brand: %" GST_FOURCC_FORMAT,
|
||||
GST_FOURCC_ARGS (qtdemux->major_brand));
|
||||
if (qtdemux->comp_brands)
|
||||
gst_buffer_unref (qtdemux->comp_brands);
|
||||
buf = qtdemux->comp_brands = gst_buffer_new_and_alloc (length - 16);
|
||||
gst_buffer_fill (buf, 0, buffer + 16, length - 16);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue