]> git.sesse.net Git - mlt/blobdiff - src/framework/mlt_profile.c
mlt_profile.c: bugfix string allocation length
[mlt] / src / framework / mlt_profile.c
index db97909e47253fc0829d4732634a5fa41fd77f01..8d0e07122317fd335f914ed08a07793c8281f90f 100644 (file)
@@ -64,7 +64,7 @@ mlt_profile mlt_profile_get( )
 mlt_profile mlt_profile_select( const char *name )
 {
        const char *prefix = PREFIX;
-       char *filename = calloc( 1, strlen( prefix ) + strlen( PROFILES_DIR ) + strlen( name ) + 1 );
+       char *filename = calloc( 1, strlen( prefix ) + strlen( PROFILES_DIR ) + strlen( name ) + 2 );
        strcpy( filename, prefix );
        if ( filename[ strlen( filename ) - 1 ] != '/' )
                filename[ strlen( filename ) ] = '/';