]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
It appears that liblzma truly does use the 'memlimit' argument
authorTim Kientzle <kientzle@gmail.com>
Fri, 12 Jun 2009 03:24:41 +0000 (23:24 -0400)
committerTim Kientzle <kientzle@gmail.com>
Fri, 12 Jun 2009 03:24:41 +0000 (23:24 -0400)
to lzma_stream_decoder() and lzma_alone_decoder() as an upper
limit on the amount of memory they will allocate, allocating
less if the stream uses less.  So I don't see any reason to
not make this value very large.

SVN-Revision: 1147

libarchive/archive_read_support_compression_xz.c

index a3c9553c92e0d1d6084211b1d0a87d4c32c5e1b5..61d9d0c63fd4d9aa577baadeabaa34beca14d2e6 100644 (file)
@@ -302,11 +302,11 @@ xz_lzma_bidder_init(struct archive_read_filter *self)
         */
        if (self->code == ARCHIVE_COMPRESSION_XZ)
                ret = lzma_stream_decoder(&(state->stream),
-                   (1U << 23) + (1U << 21),/* memlimit */
+                   (1U << 30),/* memlimit */
                    LZMA_CONCATENATED);
        else
                ret = lzma_alone_decoder(&(state->stream),
-                   (1U << 23) + (1U << 21));/* memlimit */
+                   (1U << 30));/* memlimit */
 
        if (ret == LZMA_OK)
                return (ARCHIVE_OK);