[0.11] gst-plugins-bad: mpegdemux: 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: f1810502a72719be3ac5aa20bf0310f203b31987
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=f1810502a72719be3ac5aa20bf0310f203b31987

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

mpegdemux: avoid NULL manipulation if invalid input

---

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

diff --git a/gst/mpegdemux/mpegtsparse.c b/gst/mpegdemux/mpegtsparse.c
index 164321e..273b3ed 100644
--- a/gst/mpegdemux/mpegtsparse.c
+++ b/gst/mpegdemux/mpegtsparse.c
@@ -1274,6 +1274,8 @@ mpegts_parse_get_tags_from_sdt (MpegTSParse * parse, 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_parse_get_program (parse, program_number);



More information about the gstreamer-commits mailing list