[vlc-commits] demux: ts: fix NULL deref picking PCR (#13996)

Francois Cartegnie git at videolan.org
Thu Feb 26 19:28:54 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 26 19:26:38 2015 +0100| [426edade588f6c01a8aa1bcc1cc76601594a1686] | committer: Francois Cartegnie

demux: ts: fix NULL deref picking PCR (#13996)

Doh!

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

 modules/demux/ts.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index d063898..dc459de 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -3045,7 +3045,7 @@ static int FindPCRCandidate( demux_sys_t *p_sys, ts_prg_psi_t *p_prg )
         ts_pid_t *p_pid = &p_sys->pid[i];
         if( p_pid->b_seen && p_pid->es && p_pid->es->id &&
             p_pid->i_owner_number == p_prg->i_number &&
-            p_cand->i_pid != i_previous )
+            (!p_cand || p_cand->i_pid != i_previous) )
         {
             if( p_pid->probed.i_pcr_count ) /* check PCR frequency first */
             {



More information about the vlc-commits mailing list