[vlc-commits] stream_filter: rar: reject if rar is compressed

Francois Cartegnie git at videolan.org
Wed Jul 23 04:36:58 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Jul 20 20:57:46 2014 +0900| [8840af091352a619d12ddfa1f15f509f19b7699a] | committer: Francois Cartegnie

stream_filter: rar: reject if rar is compressed

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

 modules/access/rar/stream.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access/rar/stream.c b/modules/access/rar/stream.c
index 68b4017..2655e3e 100644
--- a/modules/access/rar/stream.c
+++ b/modules/access/rar/stream.c
@@ -72,8 +72,8 @@ int RarStreamOpen(vlc_object_t *object)
     int count;
     rar_file_t **files;
     const int64_t position = stream_Tell(s->p_source);
-    if (RarParse(s->p_source, &count, &files, false) &&
-        RarParse(s->p_source, &count, &files, true ) )
+    if ((RarParse(s->p_source, &count, &files, false) &&
+         RarParse(s->p_source, &count, &files, true )) || count == 0 )
     {
         stream_Seek(s->p_source, position);
         msg_Err(s, "Invalid or unsupported RAR archive");



More information about the vlc-commits mailing list