[vlc-commits] input: fix NULL dereference with --demux ""

Rémi Denis-Courmont git at videolan.org
Wed Oct 21 18:27:46 CEST 2015


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 26 18:06:50 2015 +0300| [2cdadbd93ab978327bcb9d4cc2f16faa1272ff1c] | committer: Jean-Baptiste Kempf

input: fix NULL dereference with --demux ""

(cherry picked from commit adcff8d401c223d0442c28d3246546e7cdef2630)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=2cdadbd93ab978327bcb9d4cc2f16faa1272ff1c
---

 src/input/input.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index 05e4ff3..9832ed1 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2228,7 +2228,7 @@ static int InputSourceInit( input_thread_t *p_input,
             /* special hack for forcing a demuxer with --demux=module
              * (and do nothing with a list) */
             psz_var_demux = var_GetNonEmptyString( p_input, "demux" );
-            psz_demux = psz_var_demux;
+            psz_demux = (psz_var_demux != NULL) ? psz_var_demux : "any";
             msg_Dbg( p_input, "specified demux `%s'", psz_demux );
         }
 



More information about the vlc-commits mailing list