diff options
| author | Dan Pasanen <dan.pasanen@gmail.com> | 2015-11-21 03:51:10 -0600 |
|---|---|---|
| committer | Dan Pasanen <dan.pasanen@gmail.com> | 2015-11-21 03:51:27 -0600 |
| commit | 16304977ca877f04b55b1f4a0848107f36af26ad (patch) | |
| tree | 27b23808ce7cfcbed006fcf8707a5e0911847e8a /xzlib.c | |
| parent | 8eadaf82488fe3c7a106bb17e335447bef5c9bec (diff) | |
| parent | 6657afe83a38278f124ace71dc85f60420beb2d5 (diff) | |
| download | android_external_libxml2-16304977ca877f04b55b1f4a0848107f36af26ad.tar.gz android_external_libxml2-16304977ca877f04b55b1f4a0848107f36af26ad.tar.bz2 android_external_libxml2-16304977ca877f04b55b1f4a0848107f36af26ad.zip | |
Merge remote-tracking branch 'libxml2/master' into cm-13.0replicant-6.0-0001stable/cm-13.0-ZNH5Ystable/cm-13.0-ZNH2KBstable/cm-13.0-ZNH2Kstable/cm-13.0-ZNH0E
Change-Id: Ie7fc53fdf2140f593e0d275ae7b445b4f4723551
Diffstat (limited to 'xzlib.c')
| -rw-r--r-- | xzlib.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 */ |
