[vlc-commits] ZPL: avoid NULL dereference

Jean-Baptiste Kempf git at videolan.org
Sat Nov 15 00:55:27 CET 2014


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

ZPL: avoid NULL dereference

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

 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