From: Tim Kientzle Date: Thu, 13 Nov 2008 12:43:54 +0000 (-0500) Subject: Weaken the already-weak LZMA format check. X-Git-Tag: v2.6.0~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03a76ae4aab20ec454ca1b931411f051d2900bd5;p=thirdparty%2Flibarchive.git Weaken the already-weak LZMA format check. SVN-Revision: 254 --- 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. */