[vlc-commits] commit: Zip filter: skip .vlt & .wsz (skins) ( Jean-Philippe André )

git at videolan.org git at videolan.org
Mon May 31 08:12:47 CEST 2010


vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Mon May 31 13:43:20 2010 +0800| [80bd960092525f0af649881ccb6081da1eea4d04] | committer: Jean-Philippe André 

Zip filter: skip .vlt & .wsz (skins)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80bd960092525f0af649881ccb6081da1eea4d04
---

 modules/access/zip/zipstream.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c
index ae6316f..c862204 100644
--- a/modules/access/zip/zipstream.c
+++ b/modules/access/zip/zipstream.c
@@ -172,6 +172,18 @@ int StreamOpen( vlc_object_t *p_this )
     stream_t *s = (stream_t*) p_this;
     stream_sys_t *p_sys;
 
+    /* Verify file extension: discard .vlt files (skins) */
+    char *psz_ext = strrchr( s->psz_path, '.' );
+    if( psz_ext )
+    {
+        if( !strncasecmp( psz_ext, ".vlt", 4 ) ||
+            !strncasecmp( psz_ext, ".wsz", 4 ) )
+        {
+            msg_Dbg( s, "skipping skins package (*.vlt, *.wsz)" );
+            return VLC_EGENERIC;
+        }
+    }
+
     /* Verify file format */
     const uint8_t *p_peek;
     if( stream_Peek( s->p_source, &p_peek, i_zip_marker ) < i_zip_marker )



More information about the vlc-commits mailing list