stream_filter: rar: reject if rar is compressed
authorFrancois Cartegnie <fcvlcdev@free.fr>
Sun, 20 Jul 2014 11:57:46 +0000 (20:57 +0900)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 23 Jul 2014 02:00:31 +0000 (11:00 +0900)
modules/access/rar/stream.c

index 68b4017..2655e3e 100644 (file)
@@ -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");