aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-11-24 18:26:05 +0200
committerLasse Collin <lasse.collin@tukaani.org>2010-11-24 18:26:05 +0200
commit503dfd9bf0693e7dda58b07b34459e58418958ac (patch)
tree1dfd2bd8fbdd660211e7a60c16b23f396b7fadfb
parent6ae0a26583cbcaba47a9beed0ad41ff64d264182 (diff)
downloadxz-embedded-503dfd9bf0693e7dda58b07b34459e58418958ac.tar.gz
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.
-rw-r--r--linux/lib/decompress_unxz.c6
1 files changed, 1 insertions, 5 deletions
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: