summaryrefslogtreecommitdiff
path: root/chromium/third_party/libxml/src/globals.c
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2019-12-05 06:50:45 +0100
committerMichael BrĂ¼ning <michael.bruning@qt.io>2019-12-05 15:32:08 +0000
commita60c92087e1bd3f9864e3243d57d4c3b611ec125 (patch)
tree4eda099fd126f79221f30d15a4e1cf0ff2210d57 /chromium/third_party/libxml/src/globals.c
parentdc7abb552a0a11be2e6b78c0229742a70e35330f (diff)
downloadqtwebengine-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/globals.c')
-rw-r--r--chromium/third_party/libxml/src/globals.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/chromium/third_party/libxml/src/globals.c b/chromium/third_party/libxml/src/globals.c
index e351b03ff5c..20b430880ab 100644
--- a/chromium/third_party/libxml/src/globals.c
+++ b/chromium/third_party/libxml/src/globals.c
@@ -92,7 +92,7 @@ xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
*
* The variable holding the libxml free() implementation
*/
-xmlFreeFunc xmlFree = (xmlFreeFunc) free;
+xmlFreeFunc xmlFree = free;
/**
* xmlMalloc:
* @size: the size requested in bytes
@@ -101,7 +101,7 @@ xmlFreeFunc xmlFree = (xmlFreeFunc) free;
*
* Returns a pointer to the newly allocated block or NULL in case of error
*/
-xmlMallocFunc xmlMalloc = (xmlMallocFunc) malloc;
+xmlMallocFunc xmlMalloc = malloc;
/**
* xmlMallocAtomic:
* @size: the size requested in bytes
@@ -112,7 +112,7 @@ xmlMallocFunc xmlMalloc = (xmlMallocFunc) malloc;
*
* Returns a pointer to the newly allocated block or NULL in case of error
*/
-xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) malloc;
+xmlMallocFunc xmlMallocAtomic = malloc;
/**
* xmlRealloc:
* @mem: an already allocated block of memory
@@ -122,7 +122,19 @@ xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) malloc;
*
* Returns a pointer to the newly reallocated block or NULL in case of error
*/
-xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc;
+xmlReallocFunc xmlRealloc = realloc;
+/**
+ * xmlPosixStrdup
+ * @cur: the input char *
+ *
+ * a strdup implementation with a type signature matching POSIX
+ *
+ * Returns a new xmlChar * or NULL
+ */
+static char *
+xmlPosixStrdup(const char *cur) {
+ return((char*) xmlCharStrdup(cur));
+}
/**
* xmlMemStrdup:
* @str: a zero terminated string
@@ -131,7 +143,7 @@ xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc;
*
* Returns the copy of the string or NULL in case of error
*/
-xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
+xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup;
#endif /* DEBUG_MEMORY_LOCATION || DEBUG_MEMORY */
#include <libxml/threads.h>