[vlc-devel] [PATCH] demux/playlist/podcast: fix usage of wrong variable in if-condition

Filip Roséen filip at atch.se
Wed Mar 15 10:06:53 CET 2017


The relevant if-statement is meant to abort parsing if strdup fails,
and should therfore check the value of "psz_elname" (as node is always
not-NULL on the line in question).
---
 modules/demux/playlist/podcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/playlist/podcast.c b/modules/demux/playlist/podcast.c
index 4e3d47d3a2..e5a30e8e9c 100644
--- a/modules/demux/playlist/podcast.c
+++ b/modules/demux/playlist/podcast.c
@@ -114,7 +114,7 @@ static int Demux( demux_t *p_demux )
             {
                 free( psz_elname );
                 psz_elname = strdup( node );
-                if( unlikely(!node) )
+                if( unlikely(!psz_elname) )
                     goto error;
 
                 if( !strcmp( node, "item" ) )
-- 
2.12.0


More information about the vlc-devel mailing list