diff options
author | Daniel Veillard <veillard@redhat.com> | 2013-05-10 14:01:46 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2013-05-10 14:01:46 +0800 |
commit | 63588f476f2dc89d4c6ef70a474d7230fbf4d45e (patch) | |
tree | 6d52a3cca99b189c0c9917b7df083e13a2d7af36 /parser.c | |
parent | 1ba80b7b6f1c89873fa319461954727a7bef2441 (diff) | |
download | android_external_libxml2-63588f476f2dc89d4c6ef70a474d7230fbf4d45e.tar.gz android_external_libxml2-63588f476f2dc89d4c6ef70a474d7230fbf4d45e.tar.bz2 android_external_libxml2-63588f476f2dc89d4c6ef70a474d7230fbf4d45e.zip |
Fix a regression in xmlGetDocCompressMode()
The switch to xzlib had for consequence that the compression
level of the input was not gathered anymore in ctxt->input->buf,
then the parser compression flags was left to -1 and propagated
to the resulting document.
Fix the I/O layer to get compression detection in xzlib,
then carry it in the input buffer and the resulting document
This should fix
https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3456
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -10681,6 +10681,10 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { ctxt->sax->startDocument(ctxt->userData); if (ctxt->instate == XML_PARSER_EOF) return(-1); + if ((ctxt->myDoc != NULL) && (ctxt->input != NULL) && + (ctxt->input->buf != NULL) && (ctxt->input->buf->compressed >= 0)) { + ctxt->myDoc->compression = ctxt->input->buf->compressed; + } /* * The Misc part of the Prolog |