[vlc-devel] [PATCHv2] dvdnav: only try to open *.iso files (fix #4741)
Juha Jeronen
juha.jeronen at jyu.fi
Sun May 8 12:08:25 CEST 2011
Hi,
On 05/08/2011 12:20 PM, Rémi Denis-Courmont wrote:
> ---
> modules/access/dvdnav.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
> index 7ce239c..9711073 100644
> --- a/modules/access/dvdnav.c
> +++ b/modules/access/dvdnav.c
> @@ -1476,6 +1476,11 @@ static int ProbeDVD( const char *psz_name )
> goto bailout;
> }
> #endif
> + /* Match extension as the anchor exhibits too many false positives */
> + const size_t len = strlen( psz_name );
> + if( len < 4 || strcasecmp( psz_name + len - 4, ".iso" ) )
> + goto bailout;
> +
> /* Try to find the anchor (2 bytes at LBA 256) */
> uint16_t anchor;
>
I think this solution is fine.
Maybe we should have ".bin", too, based on what Kaarlo said?
-J
More information about the vlc-devel
mailing list