From 503dfd9bf0693e7dda58b07b34459e58418958ac Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Wed, 24 Nov 2010 18:26:05 +0200 Subject: Fix error message in decompress_unxz.c. XZ_BUF_ERROR always means that the data is corrupt because in single-call mode the output buffer size is not limited (it can overflow) because the API doesn't pass the output buffer size. XZ_BUF_ERROR cannot occur in multi-call mode because it keeps the output buffer non-full. --- linux/lib/decompress_unxz.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'linux') diff --git a/linux/lib/decompress_unxz.c b/linux/lib/decompress_unxz.c index b2d7445..537d39e 100644 --- a/linux/lib/decompress_unxz.c +++ b/linux/lib/decompress_unxz.c @@ -361,12 +361,8 @@ STATIC int INIT unxz(unsigned char *in, int in_size, break; case XZ_DATA_ERROR: - error("XZ-compressed data is corrupt"); - break; - case XZ_BUF_ERROR: - error("Output buffer is too small or the " - "XZ-compressed data is corrupt"); + error("XZ-compressed data is corrupt"); break; default: -- cgit v1.2.3