[0.11] gst-plugins-bad: mpegtsdemux: avoid NULL manipulation if invalid input

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Jan 25 04:24:00 PST 2012


Module: gst-plugins-bad
Branch: 0.11
Commit: b00ed32c5a541b3ae50d772c3ef6d66a4753efcd
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=b00ed32c5a541b3ae50d772c3ef6d66a4753efcd

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Mon Jan 23 14:06:54 2012 +0100

mpegtsdemux: avoid NULL manipulation if invalid input

---

 gst/mpegtsdemux/mpegtsbase.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c
index d8c7073..c63170e 100644
--- a/gst/mpegtsdemux/mpegtsbase.c
+++ b/gst/mpegtsdemux/mpegtsbase.c
@@ -1088,6 +1088,8 @@ mpegts_base_get_tags_from_sdt (MpegTSBase * base, GstStructure * sdt_info)
      * which looks like service-%d */
     sid_str = gst_structure_get_name (service);
     tmp = g_strstr_len (sid_str, -1, "-");
+    if (!tmp)
+      continue;
     program_number = atoi (++tmp);
 
     program = mpegts_base_get_program (base, program_number);



More information about the gstreamer-commits mailing list