[vlc-devel] commit: Fix warning (Christophe Mutricy )

git version control git at videolan.org
Fri Jul 11 22:07:05 CEST 2008


vlc | branch: master | Christophe Mutricy <xtophe at videolan.org> | Fri Jul 11 20:02:08 2008 +0100| [208371724fe28e3c4df0d6a741e1d2975b35600e]

Fix warning

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

 modules/demux/mp4/mp4.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index a3fdcd2..7b98fee 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -403,8 +403,9 @@ static int Open( vlc_object_t * p_this )
                     if( end ) end[1] = '\0';
                     else *psz_path = '\0';
 
-                    asprintf( &psz_absolute, "%s://%s%s",
-                                  p_demux->psz_access, psz_path, psz_ref );
+                    if( asprintf( &psz_absolute, "%s://%s%s",
+                                  p_demux->psz_access, psz_path, psz_ref ) < 0 )
+                        return VLC_ENOMEM;
 
                     free( psz_ref );
                     psz_ref = psz_absolute;




More information about the vlc-devel mailing list