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

Tim Müller tpm at kemper.freedesktop.org
Mon Jan 30 04:41:47 PST 2012


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

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