[vlc-devel] [PATCHv2] dvdnav: only try to open *.iso files (fix #4741)

Rémi Denis-Courmont remi at remlab.net
Sun May 8 11:20:24 CEST 2011


---
 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;
 
-- 
1.7.5.1




More information about the vlc-devel mailing list