[vlc-devel] commit: Do not call EnsureUTF8 on NULL string (cdtext). (Laurent Aimar )

git version control git at videolan.org
Sat May 16 01:09:58 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri May 15 23:20:15 2009 +0200| [11e0b5e5a79575fe3be017939c35e5b4cd0d4242] | committer: Laurent Aimar 

Do not call EnsureUTF8 on NULL string (cdtext).

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

 modules/access/vcd/cdrom.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/access/vcd/cdrom.c b/modules/access/vcd/cdrom.c
index 10c5a7d..22b29de 100644
--- a/modules/access/vcd/cdrom.c
+++ b/modules/access/vcd/cdrom.c
@@ -1330,7 +1330,8 @@ static int CdTextParse( vlc_meta_t ***ppp_tracks, int *pi_tracks,
         for( int i = 0; i <= i_track_last; i++ )
         {
             /* */
-            EnsureUTF8( pppsz_info[i][j] );
+            if( pppsz_info[i][j] )
+                EnsureUTF8( pppsz_info[i][j] );
 
             /* */
             const char *psz_default = pppsz_info[0][j];




More information about the vlc-devel mailing list