adaptivedemux2: Fix uninitialised memory usage in debug
authorJan Schmidt <jan@centricular.com>
Wed, 10 Aug 2022 15:01:07 +0000 (01:01 +1000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 12 Aug 2022 13:52:59 +0000 (13:52 +0000)
Fix printing uninitialised memory by clearing the
GstAdaptiveDemuxClock structure when allocating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>

subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemuxutils.c

index de0a7e2..925f935 100644 (file)
@@ -59,7 +59,7 @@ struct _GstAdaptiveDemuxLoop
 GstAdaptiveDemuxClock *
 gst_adaptive_demux_clock_new (void)
 {
-  GstAdaptiveDemuxClock *clock = g_slice_new (GstAdaptiveDemuxClock);
+  GstAdaptiveDemuxClock *clock = g_slice_new0 (GstAdaptiveDemuxClock);
   GstClockType clock_type = GST_CLOCK_TYPE_OTHER;
   GObjectClass *gobject_class;