Commit bcb07441 authored by Rémi Duraffort's avatar Rémi Duraffort

Check for the return value of fwrite.

parent bb41fd6d
......@@ -1287,7 +1287,11 @@ void update_DownloadReal( update_download_thread_t *p_udt )
while( ( i_read = stream_Read( p_stream, p_buffer, 1 << 10 ) ) &&
!intf_ProgressIsCancelled( p_udt, i_progress ) )
{
fwrite( p_buffer, i_read, 1, p_file );
if( fwrite( p_buffer, i_read, 1, p_file ) < 1 )
{
msg_Err( p_udt, "Failed to write into %s", psz_destfile );
break;
}
l_downloaded += i_read;
psz_downloaded = size_str( l_downloaded );
......
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