Commit 256878bc authored by Rafaël Carré's avatar Rafaël Carré

video_output: fix 4 bytes too short memory allocation

parent 77aa5b9e
...@@ -1665,12 +1665,8 @@ static void DisplayTitleOnOSD( vout_thread_t *p_vout ) ...@@ -1665,12 +1665,8 @@ static void DisplayTitleOnOSD( vout_thread_t *p_vout )
else if( !EMPTY_STR( psz_artist ) ) else if( !EMPTY_STR( psz_artist ) )
{ {
char *psz_string = NULL; char *psz_string = NULL;
if( asprintf( &psz_string, "%s - %s", psz_name, psz_artist ) != -1 )
psz_string = malloc( strlen( psz_name ) + strlen( psz_artist ) );
if( psz_string )
{ {
sprintf( psz_string, "%s - %s", psz_name, psz_artist );
vout_ShowTextAbsolute( p_vout, DEFAULT_CHAN, vout_ShowTextAbsolute( p_vout, DEFAULT_CHAN,
psz_string, NULL, psz_string, NULL,
p_vout->i_title_position, p_vout->i_title_position,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment