[vlc-commits] playlist/asx: fix item creation not checked

Thomas Guillem git at videolan.org
Sun Apr 17 07:30:06 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sun Apr 17 08:26:33 2016 +0300| [f9adc65acfbe594e7814947f20d0f6858b65e052] | committer: Thomas Guillem

playlist/asx: fix item creation not checked

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

 modules/demux/playlist/asx.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/demux/playlist/asx.c b/modules/demux/playlist/asx.c
index 3a38771..970e04f 100644
--- a/modules/demux/playlist/asx.c
+++ b/modules/demux/playlist/asx.c
@@ -267,6 +267,9 @@ static void ProcessEntry( int *pi_n_entry, xml_reader_t *p_xml_reader,
                 /* Create the input item */
                 p_entry = input_item_NewExt( psz_mrl, psz_name, i_duration,
                                              ITEM_TYPE_UNKNOWN, ITEM_NET_UNKNOWN );
+                if( p_entry == NULL )
+                    goto end;
+
                 input_item_AddOptions( p_entry, i_options,
                                        (const char **)ppsz_options,
                                        VLC_INPUT_OPTION_TRUSTED );
@@ -290,6 +293,7 @@ static void ProcessEntry( int *pi_n_entry, xml_reader_t *p_xml_reader,
 
                 input_item_Release( p_entry );
 
+end:
                 while( i_options )
                     free( ppsz_options[--i_options] );
                 free( psz_name );



More information about the vlc-commits mailing list