[vlc-commits] demux/playlist/xspf: prevent crash on empty <vlc:id>

Filip Roséen git at videolan.org
Wed Mar 15 19:19:23 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Wed Mar 15 10:07:32 2017 +0100| [7ef197a43ad85221671c29b1b4cacb947dd3f07b] | committer: Hugo Beauzée-Luyssen

demux/playlist/xspf: prevent crash on empty <vlc:id>

psz_value is given a value when the node type is XML_READER_TEXT, but
given that this is not guaranteed to ever happen before
XML_READER_ENDELEM there is nothing stating that psz_value is not
NULL.

fixes: #18125

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

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

diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index 16ee1b3..73be5ce 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -741,7 +741,7 @@ static bool parse_extension_node COMPLEX_INTERFACE
                 }
 
                 /* special tag <vlc:id> */
-                if (!strcmp(p_handler->name, "vlc:id"))
+                if (!strcmp(p_handler->name, "vlc:id") && psz_value )
                 {
                     p_demux->p_sys->i_track_id = atoi(psz_value);
                 }



More information about the vlc-commits mailing list