Show
Ignore:
Timestamp:
20/08/08 23:22:23 (3 months ago)
Author:
Rémi Duraffort <ivoire@videolan.org>
git-committer:
Rémi Duraffort <ivoire@videolan.org> 1219267343 +0200
git-parent:

[70db1cf54fadb21898f5228e83e3aaefdae463e4]

git-author:
Rémi Duraffort <ivoire@videolan.org> 1219265124 +0200
Message:

Check malloc return value.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/meta_engine/taglib.cpp

    r7024531 r3059bd8  
    300300                    char *psz_ufid = (char*) malloc( 64 ); 
    301301                    int j = 0; 
    302                     while( ( j < 63 ) && 
    303                             ( j < p_ufid->identifier().size() ) ) 
    304                         psz_ufid[j] = p_ufid->identifier()[j++]; 
    305                     psz_ufid[j] = '\0'; 
    306                     vlc_meta_SetTrackID( p_meta, psz_ufid ); 
    307                     free( psz_ufid ); 
     302                    if( psz_ufid ) 
     303                    { 
     304                        while( ( j < 63 ) && 
     305                               ( j < p_ufid->identifier().size() ) ) 
     306                            psz_ufid[j] = p_ufid->identifier()[j++]; 
     307                        psz_ufid[j] = '\0'; 
     308                        vlc_meta_SetTrackID( p_meta, psz_ufid ); 
     309                        free( psz_ufid ); 
     310                    } 
    308311                } 
    309312            }