aboutsummaryrefslogtreecommitdiffstats
path: root/xzlib.c
diff options
context:
space:
mode:
authorDan Pasanen <dan.pasanen@gmail.com>2015-11-21 03:51:10 -0600
committerDan Pasanen <dan.pasanen@gmail.com>2015-11-21 03:51:27 -0600
commit16304977ca877f04b55b1f4a0848107f36af26ad (patch)
tree27b23808ce7cfcbed006fcf8707a5e0911847e8a /xzlib.c
parent8eadaf82488fe3c7a106bb17e335447bef5c9bec (diff)
parent6657afe83a38278f124ace71dc85f60420beb2d5 (diff)
downloadandroid_external_libxml2-16304977ca877f04b55b1f4a0848107f36af26ad.tar.gz
android_external_libxml2-16304977ca877f04b55b1f4a0848107f36af26ad.tar.bz2
android_external_libxml2-16304977ca877f04b55b1f4a0848107f36af26ad.zip
Change-Id: Ie7fc53fdf2140f593e0d275ae7b445b4f4723551
Diffstat (limited to 'xzlib.c')
-rw-r--r--xzlib.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xzlib.c b/xzlib.c
index 0dcb9f48..782957f6 100644
--- a/xzlib.c
+++ b/xzlib.c
@@ -8,7 +8,7 @@
*/
#define IN_LIBXML
#include "libxml.h"
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
#include <string.h>
#ifdef HAVE_ERRNO_H
@@ -34,7 +34,9 @@
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#endif
+#ifdef HAVE_LZMA_H
#include <lzma.h>
+#endif
#include "xzlib.h"
#include <libxml/xmlmemory.h>
@@ -581,6 +583,10 @@ xz_decomp(xz_statep state)
xz_error(state, LZMA_DATA_ERROR, "compressed data error");
return -1;
}
+ if (ret == LZMA_PROG_ERROR) {
+ xz_error(state, LZMA_PROG_ERROR, "compression error");
+ return -1;
+ }
} while (strm->avail_out && ret != LZMA_STREAM_END);
/* update available output and crc check value */
@@ -795,4 +801,4 @@ __libxml2_xzclose(xzFile file)
xmlFree(state);
return ret ? ret : LZMA_OK;
}
-#endif /* HAVE_LZMA_H */
+#endif /* LIBXML_LZMA_ENABLED */