Commit 4eb1ffe9 authored by Rémi Denis-Courmont's avatar 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
parent 9355833c
...@@ -1466,6 +1466,11 @@ static int ProbeDVD( demux_t *p_demux, char *psz_name ) ...@@ -1466,6 +1466,11 @@ static int ProbeDVD( demux_t *p_demux, char *psz_name )
goto bailout; 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) */ /* Try to find the anchor (2 bytes at LBA 256) */
if( lseek( i_fd, 256 * DVD_VIDEO_LB_LEN, SEEK_SET ) != -1 if( lseek( i_fd, 256 * DVD_VIDEO_LB_LEN, SEEK_SET ) != -1
&& read( i_fd, pi_anchor, 2 ) == 2 && read( i_fd, pi_anchor, 2 ) == 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment