[vlc-commits] archive: Add support for RAR 5.0 format

Johan Gunnarsson git at videolan.org
Sun Nov 3 11:40:02 CET 2019


vlc | branch: master | Johan Gunnarsson <johan.gunnarsson at gmail.com> | Sun Nov  3 00:23:00 2019 +0100| [059f6f5690005853f3e3160f5f896301b2f52ecd] | committer: Jean-Baptiste Kempf

archive: Add support for RAR 5.0 format

libarchive 3.4.0 adds support for RAR 5.0. See
https://www.rarlab.com/technote.htm#rarsign for description of signatures.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/stream_extractor/archive.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
index 3498bd2fb9..f9493bbbd6 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -453,7 +453,10 @@ static int probe( stream_t* source )
     } const magicbytes[] = {
         /* keep heaviest at top */
         { 257, 5, "ustar" },              //TAR
-        { 0,   7, "Rar!\x1A\x07" },       //RAR
+#if ARCHIVE_VERSION_NUMBER >= 3004000
+        { 0,   8, "Rar!\x1A\x07\x01" },   //RAR5.0
+#endif
+        { 0,   7, "Rar!\x1A\x07" },       //RAR4.x
         { 0,   6, "7z\xBC\xAF\x27\x1C" }, //7z
         { 0,   4, "xar!" },               //XAR
         { 0,   4, "PK\x03\x04" },         //ZIP



More information about the vlc-commits mailing list