diff --git a/patches/inox-patchset/fix-cfi-failures-with-unbundles-libxml.patch b/patches/inox-patchset/fix-cfi-failures-with-unbundles-libxml.patch new file mode 100644 index 00000000..fc10ac2d --- /dev/null +++ b/patches/inox-patchset/fix-cfi-failures-with-unbundles-libxml.patch @@ -0,0 +1,139 @@ +--- a/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc ++++ b/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc +@@ -136,11 +136,11 @@ class PendingStartElementNSCallback fina + attribute_count_(attribute_count), + defaulted_count_(defaulted_count) { + namespaces_ = static_cast( +- xmlMalloc(sizeof(xmlChar*) * namespace_count * 2)); ++ malloc(sizeof(xmlChar*) * namespace_count * 2)); + for (int i = 0; i < namespace_count * 2; ++i) + namespaces_[i] = xmlStrdup(namespaces[i]); + attributes_ = static_cast( +- xmlMalloc(sizeof(xmlChar*) * attribute_count * 5)); ++ malloc(sizeof(xmlChar*) * attribute_count * 5)); + for (int i = 0; i < attribute_count; ++i) { + // Each attribute has 5 elements in the array: + // name, prefix, uri, value and an end pointer. +@@ -154,12 +154,12 @@ class PendingStartElementNSCallback fina + + ~PendingStartElementNSCallback() override { + for (int i = 0; i < namespace_count_ * 2; ++i) +- xmlFree(namespaces_[i]); +- xmlFree(namespaces_); ++ free(namespaces_[i]); ++ free(namespaces_); + for (int i = 0; i < attribute_count_; ++i) + for (int j = 0; j < 4; ++j) +- xmlFree(attributes_[i * 5 + j]); +- xmlFree(attributes_); ++ free(attributes_[i * 5 + j]); ++ free(attributes_); + } + + void Call(XMLDocumentParser* parser) override { +@@ -201,7 +201,7 @@ class PendingCharactersCallback final + PendingCharactersCallback(const xmlChar* chars, int length) + : chars_(xmlStrndup(chars, length)), length_(length) {} + +- ~PendingCharactersCallback() override { xmlFree(chars_); } ++ ~PendingCharactersCallback() override { free(chars_); } + + void Call(XMLDocumentParser* parser) override { + parser->Characters(chars_, length_); +@@ -277,7 +277,7 @@ class PendingErrorCallback final : publi + line_number_(line_number), + column_number_(column_number) {} + +- ~PendingErrorCallback() override { xmlFree(message_); } ++ ~PendingErrorCallback() override { free(message_); } + + void Call(XMLDocumentParser* parser) override { + parser->HandleError(type_, reinterpret_cast(message_), +--- a/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc ++++ b/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc +@@ -189,7 +189,7 @@ void XSLStyleSheet::LoadChildSheets() { + xmlChar* uri_ref = + xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE); + LoadChildSheet(String::FromUTF8((const char*)uri_ref)); +- xmlFree(uri_ref); ++ free(uri_ref); + } else { + break; + } +@@ -203,7 +203,7 @@ void XSLStyleSheet::LoadChildSheets() { + xmlChar* uri_ref = + xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE); + LoadChildSheet(String::FromUTF8((const char*)uri_ref)); +- xmlFree(uri_ref); ++ free(uri_ref); + } + curr = curr->next; + } +@@ -292,8 +292,8 @@ xmlDocPtr XSLStyleSheet::LocateStyleshee + xmlChar* child_uri = + xmlBuildURI((const xmlChar*)import_href.data(), base); + bool equal_ur_is = xmlStrEqual(uri, child_uri); +- xmlFree(base); +- xmlFree(child_uri); ++ free(base); ++ free(child_uri); + if (equal_ur_is) { + child->MarkAsProcessed(); + return child->GetDocument(); +--- a/third_party/blink/renderer/core/xml/xslt_extensions.cc ++++ b/third_party/blink/renderer/core/xml/xslt_extensions.cc +@@ -69,7 +69,7 @@ static void ExsltNodeSetFunction(xmlXPat + CHECK(ret); + + if (strval) +- xmlFree(strval); ++ free(strval); + + valuePush(ctxt, ret); + } +--- a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc ++++ b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc +@@ -104,7 +104,7 @@ static xmlDocPtr DocLoaderFunc(const xml + xmlChar* base = xmlNodeGetBase(context->document->doc, context->node); + KURL url(KURL(reinterpret_cast(base)), + reinterpret_cast(uri)); +- xmlFree(base); ++ free(base); + + ResourceLoaderOptions fetch_options; + fetch_options.initiator_info.name = FetchInitiatorTypeNames::xml; +--- a/third_party/blink/renderer/core/xml/xslt_unicode_sort.cc ++++ b/third_party/blink/renderer/core/xml/xslt_unicode_sort.cc +@@ -273,18 +273,18 @@ void XsltUnicodeSortFunction(xsltTransfo + comp = static_cast(sorts[j]->psvi); + if (tempstype[j] == 1) { + // The data-type needs to be recomputed each time. +- xmlFree(const_cast(comp->stype)); ++ free(const_cast(comp->stype)); + comp->stype = nullptr; + } + if (temporder[j] == 1) { + // The order needs to be recomputed each time. +- xmlFree(const_cast(comp->order)); ++ free(const_cast(comp->order)); + comp->order = nullptr; + } + if (results_tab[j]) { + for (int i = 0; i < len; ++i) + xmlXPathFreeObject(results_tab[j][i]); +- xmlFree(results_tab[j]); ++ free(results_tab[j]); + } + } + } +--- a/third_party/libxml/chromium/libxml_utils.cc ++++ b/third_party/libxml/chromium/libxml_utils.cc +@@ -23,7 +23,7 @@ std::string XmlStringToStdString(const x + // Same as XmlStringToStdString but also frees |xmlstring|. + std::string XmlStringToStdStringWithDelete(xmlChar* xmlstring) { + std::string result = XmlStringToStdString(xmlstring); +- xmlFree(xmlstring); ++ free(xmlstring); + return result; + } + diff --git a/patches/inox-patchset/include-stdint.h-in-pdfium_mem_buffer_file_write.h.patch b/patches/inox-patchset/include-stdint.h-in-pdfium_mem_buffer_file_write.h.patch new file mode 100644 index 00000000..14bbb0c9 --- /dev/null +++ b/patches/inox-patchset/include-stdint.h-in-pdfium_mem_buffer_file_write.h.patch @@ -0,0 +1,25 @@ +From e3ad3deb6a6e79284f3748fa7410311d87df91c5 Mon Sep 17 00:00:00 2001 +From: Henrique Nakashima +Date: Tue, 4 Sep 2018 16:49:51 +0000 +Subject: [PATCH] IWYU: stdint.h in pdfium_mem_buffer_file_write.h for uint8_t + +Bug: 879900 +Change-Id: I9c15d1c280a23c53d31f2d72c9d0d1db79eab886 +Reviewed-on: https://chromium-review.googlesource.com/1204410 +Reviewed-by: Lei Zhang +Commit-Queue: Henrique Nakashima +Cr-Commit-Position: refs/heads/master@{#588547} +--- + pdf/pdfium/pdfium_mem_buffer_file_write.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/pdf/pdfium/pdfium_mem_buffer_file_write.h ++++ b/pdf/pdfium/pdfium_mem_buffer_file_write.h +@@ -6,6 +6,7 @@ + #define PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_H_ + + #include ++#include + + #include +