[Bug 751528] mpegdemux: Fix a prevent defect which dereference null return value. (Minor clean up)
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Fri Jun 26 00:30:33 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=751528
--- Comment #4 from Sangkyu Park <sk1122.park at samsung.com> ---
Comment on attachment 306142
--> https://bugzilla.gnome.org/attachment.cgi?id=306142
Sorry, I attached the patch again.
>From 261d6534f23958d22de025a29b5d3aa7b906ac45 Mon Sep 17 00:00:00 2001
>From: Sangkyu Park <sk1122.park at samsung.com>
>Date: Fri, 26 Jun 2015 15:58:25 +0900
>Subject: [PATCH] mpegdemux: Minor clean-up
>
>Fix a prevent defect which dereference null return value.
>'gst_ups_demux_get_stream' function could return NULL when it is unknown stream.
>
>https://bugzilla.gnome.org/show_bug.cgi?id=751528
>---
> gst/mpegdemux/gstmpegdemux.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> mode change 100644 => 100755 gst/mpegdemux/gstmpegdemux.c
>
>diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
>old mode 100644
>new mode 100755
>index ab9b364..54551c9
>--- a/gst/mpegdemux/gstmpegdemux.c
>+++ b/gst/mpegdemux/gstmpegdemux.c
>@@ -824,7 +824,7 @@ gst_ps_demux_handle_dvd_event (GstPsDemux * demux, GstEvent * event)
>
> g_snprintf (cur_stream_name, 32, "audio-%d-language", i);
> lang_code = gst_structure_get_string (structure, cur_stream_name);
>- if (lang_code) {
>+ if (lang_code && temp) {
> GstTagList *list = temp->pending_tags;
>
> if (!list)
>@@ -855,6 +855,8 @@ gst_ps_demux_handle_dvd_event (GstPsDemux * demux, GstEvent * event)
> /* Retrieve the subpicture stream to force pad creation */
> temp = gst_ps_demux_get_stream (demux, 0x20 + stream_id,
> ST_PS_DVD_SUBPICTURE);
>+ if (temp == NULL)
>+ continue;
>
> g_snprintf (cur_stream_name, 32, "subpicture-%d-language", i);
> lang_code = gst_structure_get_string (structure, cur_stream_name);
>--
>1.7.9.5
>
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list