From 03a76ae4aab20ec454ca1b931411f051d2900bd5 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Thu, 13 Nov 2008 07:43:54 -0500 Subject: [PATCH] Weaken the already-weak LZMA format check. SVN-Revision: 254 --- libarchive/archive_read_support_compression_lzma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libarchive/archive_read_support_compression_lzma.c b/libarchive/archive_read_support_compression_lzma.c index e90c0d64a..2fd8572f1 100644 --- a/libarchive/archive_read_support_compression_lzma.c +++ b/libarchive/archive_read_support_compression_lzma.c @@ -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. */ -- 2.47.3