[git commit master] decompress_unxz: allocate permanent crc32 table _fisrt_

Denys Vlasenko vda.linux at googlemail.com
Tue Jun 1 21:26:54 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=8376bfae58f1e32325eef934aaea8116995bb96a
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 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 374b76d..3f93929 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)
 		OUT_SIZE = 60 * 1024,
 	};
 
+	if (!crc32_table)
+		crc32_table = crc32_filltable(NULL, /*endian:*/ 0);
+
 	membuf = xmalloc(IN_SIZE + OUT_SIZE);
 	memset(&iobuf, 0, sizeof(iobuf));
 	iobuf.in = membuf;
 	iobuf.out = membuf + IN_SIZE;
 	iobuf.out_size = OUT_SIZE;
 
-	if (!crc32_table)
-		crc32_table = crc32_filltable(NULL, /*endian:*/ 0);
-
 	state = xz_dec_init(64*1024); /* initial dict of 64k */
 
 	while (1) {
-- 
1.6.3.3



More information about the busybox-cvs mailing list