From 7f105a919a73e49b8210a7e40de2a148129ae065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 2 Nov 2021 17:54:46 +0200 Subject: [PATCH] qtdemux: Don't free cslg data that we don't own on corrupt files Part-of: --- subprojects/gst-plugins-good/gst/isomp4/qtdemux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index f823ff1a73..ae30290291 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -9386,10 +9386,8 @@ qtdemux_stbl_init (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * stbl) /* This is optional, if missing we iterate the ctts */ if (qtdemux_tree_get_child_by_type_full (stbl, FOURCC_cslg, &cslg)) { if (!gst_byte_reader_skip (&cslg, 1 + 3) - || !gst_byte_reader_get_uint32_be (&cslg, &stream->cslg_shift)) { - g_free ((gpointer) cslg.data); + || !gst_byte_reader_get_uint32_be (&cslg, &stream->cslg_shift)) goto corrupt_file; - } } else { gint32 cslg_least = 0; guint num_entries, pos;