[vlc-commits] dvdnav: only try to regular files matching *.iso (fix #4741)
Rémi Denis-Courmont
git at videolan.org
Sun May 8 19:39:23 CEST 2011
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 8 12:19:17 2011 +0300| [4eb1ffe9876daffe55a06f765ec9d00253532408] | committer: Rémi Denis-Courmont
dvdnav: only try to regular files matching *.iso (fix #4741)
(This does not affect directories and block devices.)
(cherry picked from commit 5699c34a510ae92568b903360e57ac0942fd3dcf)
Conflicts:
modules/access/dvdnav.c
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=4eb1ffe9876daffe55a06f765ec9d00253532408
---
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 af09f13..2d9bf8b 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -1466,6 +1466,11 @@ static int ProbeDVD( demux_t *p_demux, char *psz_name )
goto bailout;
}
+ /* 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) */
if( lseek( i_fd, 256 * DVD_VIDEO_LB_LEN, SEEK_SET ) != -1
&& read( i_fd, pi_anchor, 2 ) == 2
More information about the vlc-commits
mailing list