vlc | branch: master | Tristan Matthews <[email protected]> | Thu Oct 27 01:19:30 2016 -0400| [f6ddc1490fd25421d2b2eea59c26ab7eff26e76c] | committer: Tristan Matthews
stream_filter: adf: require .adf extension This should avoid some false positives. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f6ddc1490fd25421d2b2eea59c26ab7eff26e76c --- modules/stream_filter/adf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/stream_filter/adf.c b/modules/stream_filter/adf.c index d3e2476..6d27948 100644 --- a/modules/stream_filter/adf.c +++ b/modules/stream_filter/adf.c @@ -69,6 +69,16 @@ static int Open( vlc_object_t *p_object ) { stream_t *p_stream = (stream_t *)p_object; + /* Require .adf extension unless forced. */ + if( !p_stream->obj.force ) + { + if( !p_stream->psz_url ) + return VLC_EGENERIC; + const char *psz_ext = strrchr( p_stream->psz_url, '.' ); + if( !psz_ext || strncmp( psz_ext, ".adf", 4 ) ) + return VLC_EGENERIC; + } + const uint8_t *peek; if( vlc_stream_Peek( p_stream->p_source, &peek, 3 ) < 3 ) return VLC_EGENERIC; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
