Commit 430db781 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

Prevents crash when arturl is misformatted, and can't be translated to a filename

parent f068bc2d
......@@ -416,6 +416,11 @@ int input_DownloadAndCacheArt( playlist_t *p_playlist, input_item_t *p_item )
uint8_t p_buffer[65536];
long int l_read;
FILE *p_file = utf8_fopen( psz_filename+7, "w" );
if( p_file == NULL ) {
msg_Err( p_playlist, "Unable write album art in %s" );
free( psz_arturl_m );
return VLC_EGENERIC;
}
int err = 0;
while( ( l_read = stream_Read( p_stream, p_buffer, sizeof (p_buffer) ) ) )
{
......
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