Skip to content

Commit

Permalink
Do not use sprintf without a format
Browse files Browse the repository at this point in the history
  • Loading branch information
funman committed Mar 24, 2008
1 parent 308aaf6 commit 8956173
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/text/strings.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,8 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
int b_empty_if_na = 0;
char buf[10];
int i_size = strlen( string ) + 1; /* +1 to store '\0' */
char *dst = malloc( i_size );
char *dst = strdup( string );
if( !dst ) return NULL;
int d = 0;

playlist_t *p_playlist = pl_Yield( p_object );
Expand All @@ -672,8 +673,6 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
p_item = input_GetItem(p_input);
}

sprintf( dst, string );

while( *s )
{
if( b_is_format )
Expand Down

0 comments on commit 8956173

Please sign in to comment.