[vlc-commits] dvdnav: also white-list *.img files (fixes #4951)
Rémi Denis-Courmont
git at videolan.org
Sat Jun 18 11:33:37 CEST 2011
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 18 12:05:28 2011 +0300| [44e61560bee67d741ed4278fbcac310cb2cb6bf5] | committer: Rémi Denis-Courmont
dvdnav: also white-list *.img files (fixes #4951)
(cherry picked from commit 00eb305f2afebf28dd649d507aca4901d0ad1e8a)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=44e61560bee67d741ed4278fbcac310cb2cb6bf5
---
modules/access/dvdnav.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 2d9bf8b..dd49e72 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -1467,8 +1467,11 @@ static int ProbeDVD( demux_t *p_demux, char *psz_name )
}
/* 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" ) )
+ const char *ext = strrchr( psz_name, '.' );
+ if( ext == NULL )
+ goto bailout;
+ ext++;
+ if( strcasecmp( ext, "iso" ) && strcasecmp( ext, "img" ) )
goto bailout;
/* Try to find the anchor (2 bytes at LBA 256) */
More information about the vlc-commits
mailing list