]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
<sigh> Weaken the already-weak LZMA format check.
authorTim Kientzle <kientzle@gmail.com>
Thu, 13 Nov 2008 12:43:54 +0000 (07:43 -0500)
committerTim Kientzle <kientzle@gmail.com>
Thu, 13 Nov 2008 12:43:54 +0000 (07:43 -0500)
SVN-Revision: 254

libarchive/archive_read_support_compression_lzma.c

index e90c0d64a772bd53245460a7407c738b037f77a4..2fd8572f1005e3be30a00615b1ff5f17877d9c8f 100644 (file)
@@ -147,11 +147,15 @@ lzma_reader_bid(struct archive_reader *self, const void *buff, size_t len)
        bits_checked += 8;
 
        /* ??? TODO:  Explain this.  ??? */
+       /* NSIS format check uses this, but I've seen tar.lzma
+        * archives where this byte is 0xff, not 0. */
+#if 0
        if (len < 6)
                return (bits_checked);
        if (buffer[5] != 0)
                return (0);
        bits_checked += 8;
+#endif
 
        /* TODO: The above test is still very weak.  It would be
         * good to do better. */