[vlc-commits] commit: xspf: silently skip unknown extension nodes (fix #3696) ( Rémi Duraffort )
    git at videolan.org 
    git at videolan.org
       
    Sun Jun 27 20:22:11 CEST 2010
    
    
  
vlc/vlc-1.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jun 27 20:07:15 2010 +0200| [17f0a3c34577e2671b241141d5d103fdcaeb2113] | committer: Jean-Baptiste Kempf 
xspf: silently skip unknown extension nodes (fix #3696)
(cherry picked from commit 0601ce56ed422cc56a63da6d8f3b0123dad340e0)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=17f0a3c34577e2671b241141d5d103fdcaeb2113
---
 modules/demux/playlist/xspf.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index 278ad10..27bef70 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -738,11 +738,28 @@ static bool parse_extension_node COMPLEX_INTERFACE
             msg_Warn( p_demux, "<extension> requires \"application\" attribute" );
             return false;
         }
+        /* Skip the extension if the application is not vlc
+           This will skip all children of the current node */
         else if( strcmp( psz_application, "http://www.videolan.org/vlc/playlist/0" ) )
         {
             msg_Dbg( p_demux, "Skipping \"%s\" extension tag", psz_application );
             free( psz_application );
-            return false;
+            /* Skip all children */
+            while( xml_ReaderRead( p_xml_reader ) == 1 )
+            {
+                if( xml_ReaderNodeType( p_xml_reader ) == XML_READER_ENDELEM )
+                {
+                    char *psz_name = xml_ReaderName( p_xml_reader );
+                    if( !strcmp( psz_name, "extension" ) )
+                    {
+                        free( psz_name );
+                        break;
+                    }
+                    msg_Dbg( p_demux, "\tskipping \"%s\" extension child", psz_name );
+                    free( psz_name );
+                }
+            }
+            return true;
         }
     }
     free( psz_application );
    
    
More information about the vlc-commits
mailing list