From 67030c152bdaae04c9cb92cd5ef323454047b835 Mon Sep 17 00:00:00 2001 From: Zaheer Abbas Merali Date: Fri, 3 Oct 2008 09:11:16 +0000 Subject: gst/mpegtsparse/mpegtsparse.c: Fix possible crash where pat is pointing to a freed structure. Original commit message from CVS: * gst/mpegtsparse/mpegtsparse.c: Fix possible crash where pat is pointing to a freed structure. --- ChangeLog | 5 +++++ gst/mpegtsparse/mpegtsparse.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18457b6d..feab1f44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-03 Zaheer Abbas Merali + + * gst/mpegtsparse/mpegtsparse.c: + Fix possible crash where pat is pointing to a freed structure. + 2008-10-03 Stefan Kost * ext/metadata/metadata_mapping.htm: diff --git a/gst/mpegtsparse/mpegtsparse.c b/gst/mpegtsparse/mpegtsparse.c index 3ac66c7a..3aa49db5 100644 --- a/gst/mpegtsparse/mpegtsparse.c +++ b/gst/mpegtsparse/mpegtsparse.c @@ -248,8 +248,9 @@ mpegts_parse_reset (MpegTSParse * parse) /* PAT */ g_hash_table_insert (parse->psi_pids, GINT_TO_POINTER (0), GINT_TO_POINTER (1)); - + parse->pat = NULL; /* pmt pids will be added and removed dynamically */ + } static void @@ -290,8 +291,10 @@ mpegts_parse_finalize (GObject * object) MpegTSParse *parse = GST_MPEGTS_PARSE (object); g_free (parse->program_numbers); - if (parse->pat) + if (parse->pat) { gst_structure_free (parse->pat); + parse->pat = NULL; + } g_hash_table_destroy (parse->programs); g_hash_table_destroy (parse->psi_pids); -- cgit v1.2.1