[vlc-commits] ZPL: avoid NULL dereference

Jean-Baptiste Kempf git at videolan.org
Mon Nov 17 09:33:28 CET 2014


vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Nov 15 00:49:41 2014 +0100| [bdf63c7e4d89043a823ea168039cc0d9ab7f9366] | committer: Jean-Baptiste Kempf

ZPL: avoid NULL dereference

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

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

 modules/demux/playlist/zpl.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/playlist/zpl.c b/modules/demux/playlist/zpl.c
index f909c47..12bbb8a 100644
--- a/modules/demux/playlist/zpl.c
+++ b/modules/demux/playlist/zpl.c
@@ -86,6 +86,9 @@ static int Demux( demux_t *p_demux )
     input_item_t *p_current_input = GetCurrentItem(p_demux);
 
     psz_line = stream_ReadLine( p_demux->s );
+    if( !psz_line )
+        return -1;
+
     char *psz_parse = psz_line;
 
     /* Skip leading tabs and spaces */



More information about the vlc-commits mailing list