diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2019-12-05 06:50:45 +0100 |
---|---|---|
committer | Michael BrĂ¼ning <michael.bruning@qt.io> | 2019-12-05 15:32:08 +0000 |
commit | a60c92087e1bd3f9864e3243d57d4c3b611ec125 (patch) | |
tree | 4eda099fd126f79221f30d15a4e1cf0ff2210d57 /chromium/third_party/libxml/src/xmlwriter.c | |
parent | dc7abb552a0a11be2e6b78c0229742a70e35330f (diff) | |
download | qtwebengine-chromium-a60c92087e1bd3f9864e3243d57d4c3b611ec125.tar.gz |
[Backport] Fix for CVE-2019-5815
Manual update.
Roll libxml, libxslt, that fixes a bug
libxslt fixed an issue with type confusion in xmlXPathNextPrecedingSibling.
R=dcheng@chromium.org
BUG=930663
Change-Id: Ib8055551b370c7d64957152e0fda57090110dee8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: Ic9b8f1d1639a1ef4058f805aa37f7a3c4c5ed4ed
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/libxml/src/xmlwriter.c')
-rw-r--r-- | chromium/third_party/libxml/src/xmlwriter.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/chromium/third_party/libxml/src/xmlwriter.c b/chromium/third_party/libxml/src/xmlwriter.c index 69541b894f6..b5cd171f5bc 100644 --- a/chromium/third_party/libxml/src/xmlwriter.c +++ b/chromium/third_party/libxml/src/xmlwriter.c @@ -110,7 +110,7 @@ static void xmlFreeTextWriterNsStackEntry(xmlLinkPtr lk); static int xmlCmpTextWriterNsStackEntry(const void *data0, const void *data1); static int xmlTextWriterWriteDocCallback(void *context, - const xmlChar * str, int len); + const char *str, int len); static int xmlTextWriterCloseDocCallback(void *context); static xmlChar *xmlTextWriterVSprintf(const char *format, va_list argptr) LIBXML_ATTR_FORMAT(1,0); @@ -190,9 +190,7 @@ xmlNewTextWriter(xmlOutputBufferPtr out) } memset(ret, 0, (size_t) sizeof(xmlTextWriter)); - ret->nodes = xmlListCreate((xmlListDeallocator) - xmlFreeTextWriterStackEntry, - (xmlListDataCompare) + ret->nodes = xmlListCreate(xmlFreeTextWriterStackEntry, xmlCmpTextWriterStackEntry); if (ret->nodes == NULL) { xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY, @@ -201,9 +199,7 @@ xmlNewTextWriter(xmlOutputBufferPtr out) return NULL; } - ret->nsstack = xmlListCreate((xmlListDeallocator) - xmlFreeTextWriterNsStackEntry, - (xmlListDataCompare) + ret->nsstack = xmlListCreate(xmlFreeTextWriterNsStackEntry, xmlCmpTextWriterNsStackEntry); if (ret->nsstack == NULL) { xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY, @@ -329,9 +325,7 @@ xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, return NULL; } - out = xmlOutputBufferCreateIO((xmlOutputWriteCallback) - xmlTextWriterWriteDocCallback, - (xmlOutputCloseCallback) + out = xmlOutputBufferCreateIO(xmlTextWriterWriteDocCallback, xmlTextWriterCloseDocCallback, (void *) ctxt, NULL); if (out == NULL) { @@ -3754,6 +3748,7 @@ xmlTextWriterEndDTDEntity(xmlTextWriterPtr writer) if (count < 0) return -1; sum += count; + /* Falls through. */ case XML_TEXTWRITER_DTD_ENTY: case XML_TEXTWRITER_DTD_PENT: count = xmlOutputBufferWriteString(writer->out, ">"); @@ -4421,12 +4416,12 @@ xmlCmpTextWriterNsStackEntry(const void *data0, const void *data1) * Returns -1, 0, 1 */ static int -xmlTextWriterWriteDocCallback(void *context, const xmlChar * str, int len) +xmlTextWriterWriteDocCallback(void *context, const char *str, int len) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) context; int rc; - if ((rc = xmlParseChunk(ctxt, (const char *) str, len, 0)) != 0) { + if ((rc = xmlParseChunk(ctxt, str, len, 0)) != 0) { xmlWriterErrMsgInt(NULL, XML_ERR_INTERNAL_ERROR, "xmlTextWriterWriteDocCallback : XML error %d !\n", rc); @@ -4452,7 +4447,7 @@ xmlTextWriterCloseDocCallback(void *context) if ((rc = xmlParseChunk(ctxt, NULL, 0, 1)) != 0) { xmlWriterErrMsgInt(NULL, XML_ERR_INTERNAL_ERROR, - "xmlTextWriterWriteDocCallback : XML error %d !\n", + "xmlTextWriterCloseDocCallback : XML error %d !\n", rc); return -1; } |