[vlc-commits] mux: ts: fix NULL deref (fix #17846)

Francois Cartegnie git at videolan.org
Tue Jan 10 16:11:05 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 10 16:09:57 2017 +0100| [68af6f6933ad8049c17eb14d50c50e93afcfe1de] | committer: Francois Cartegnie

mux: ts: fix NULL deref (fix #17846)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68af6f6933ad8049c17eb14d50c50e93afcfe1de
---

 modules/mux/mpeg/ts.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 7f023e7..c32817d 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -892,7 +892,8 @@ static void SelectPCRStream( sout_mux_t *p_mux, sout_input_t *p_removed_pcr_inpu
             continue;
 
         if( p_input->p_fmt->i_cat == VIDEO_ES &&
-            p_sys->p_pcr_input->fmt.i_cat != VIDEO_ES )
+           (p_sys->p_pcr_input == NULL ||
+            p_sys->p_pcr_input->fmt.i_cat != VIDEO_ES) )
         {
             p_sys->p_pcr_input = p_input;
             break;



More information about the vlc-commits mailing list