[vlc-commits] dvdnav: only try to regular files matching *.iso (fix #4741)
Rémi Denis-Courmont
git at videolan.org
Sun May 8 19:31:09 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 8 12:19:17 2011 +0300| [5699c34a510ae92568b903360e57ac0942fd3dcf] | committer: Rémi Denis-Courmont
dvdnav: only try to regular files matching *.iso (fix #4741)
(This does not affect directories and block devices.)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5699c34a510ae92568b903360e57ac0942fd3dcf
---
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 d70a205..8cceae4 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -1481,6 +1481,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;
More information about the vlc-commits
mailing list