diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-01 23:26:54 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-01 23:26:54 +0200 |
commit | 8376bfae58f1e32325eef934aaea8116995bb96a (patch) | |
tree | da78f5e596d3916ef6d8b767044f2899ec81b5cb | |
parent | b9542cb2cee6d3b5984a7c82d7aec4a4556d2fe1 (diff) | |
download | busybox-w32-8376bfae58f1e32325eef934aaea8116995bb96a.tar.gz busybox-w32-8376bfae58f1e32325eef934aaea8116995bb96a.tar.bz2 busybox-w32-8376bfae58f1e32325eef934aaea8116995bb96a.zip |
decompress_unxz: allocate permanent crc32 table _fisrt_
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | archival/libunarchive/decompress_unxz.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/archival/libunarchive/decompress_unxz.c b/archival/libunarchive/decompress_unxz.c index 374b76d66..3f9392984 100644 --- a/archival/libunarchive/decompress_unxz.c +++ b/archival/libunarchive/decompress_unxz.c | |||
@@ -62,15 +62,15 @@ unpack_xz_stream(int src_fd, int dst_fd) | |||
62 | OUT_SIZE = 60 * 1024, | 62 | OUT_SIZE = 60 * 1024, |
63 | }; | 63 | }; |
64 | 64 | ||
65 | if (!crc32_table) | ||
66 | crc32_table = crc32_filltable(NULL, /*endian:*/ 0); | ||
67 | |||
65 | membuf = xmalloc(IN_SIZE + OUT_SIZE); | 68 | membuf = xmalloc(IN_SIZE + OUT_SIZE); |
66 | memset(&iobuf, 0, sizeof(iobuf)); | 69 | memset(&iobuf, 0, sizeof(iobuf)); |
67 | iobuf.in = membuf; | 70 | iobuf.in = membuf; |
68 | iobuf.out = membuf + IN_SIZE; | 71 | iobuf.out = membuf + IN_SIZE; |
69 | iobuf.out_size = OUT_SIZE; | 72 | iobuf.out_size = OUT_SIZE; |
70 | 73 | ||
71 | if (!crc32_table) | ||
72 | crc32_table = crc32_filltable(NULL, /*endian:*/ 0); | ||
73 | |||
74 | state = xz_dec_init(64*1024); /* initial dict of 64k */ | 74 | state = xz_dec_init(64*1024); /* initial dict of 64k */ |
75 | 75 | ||
76 | while (1) { | 76 | while (1) { |