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

jpd at videolan.org jpd at videolan.org
Thu Jul 30 01:12:06 CEST 2009


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?




More information about the vlc-devel mailing list