[vlc-devel] [PATCH 4/9] raop: Implement options for password

Michael Hanselmann public at hansmi.ch
Thu Jul 30 23:21:18 CEST 2009


On Thu, Jul 30, 2009 at 1:12 AM, <jpd at videolan.org> wrote:
> On Wed, Jul 29, 2009 at 10:46:17PM +0200, Michael Hanselmann wrote:
>> +    /* Read only one line */
>> +    if ( fgets( ps_buffer, sizeof( ps_buffer ), p_file ) == NULL )
>> +    {
>> +        if ( ferror( p_file ) )
>> +        {
>> +            msg_Err( p_this, "Error reading '%s': %m", psz_path );
>> +            goto error;
>> +        }
>> +    }
>
> Just spotted this, maybe because I missed an updated patch after
> discussion: What if fgets() returns NULL but ferror() doesn't trigger,
> ie. the file is empty?

I just tested: it would use an empty password. However, I made a
couple of more changes here and will resend the patch shortly.

Regards,
Michael

-- 
http://hansmi.ch/



More information about the vlc-devel mailing list