From 764e3016b62665281539af4e990ca4ff0445c26c Mon Sep 17 00:00:00 2001 From: "Matthew J. Francis" Date: Sat, 20 Sep 2014 12:14:41 +0800 Subject: fdo#84086 Fix assorted use-after-free bugs Change-Id: Iec004fffdb0afbe27bd69f379db90f6d904a8a65 Reviewed-on: https://gerrit.libreoffice.org/11553 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- unoxml/source/dom/attr.cxx | 1 - unoxml/source/dom/documentbuilder.cxx | 6 ------ 2 files changed, 7 deletions(-) (limited to 'unoxml/source') diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx index c7b11e6e06f4..68c5c82a4e6b 100644 --- a/unoxml/source/dom/attr.cxx +++ b/unoxml/source/dom/attr.cxx @@ -180,7 +180,6 @@ namespace DOM OString o1 = OUStringToOString(value, RTL_TEXTENCODING_UTF8); xmlChar* xValue = (xmlChar*)o1.getStr(); - // xmlChar* xName = OUStringToOString(m_aAttrPtr->name, RTL_TEXTENCODING_UTF8).getStr(); // this does not work if the attribute was created anew // xmlNodePtr pNode = m_aAttrPtr->parent; // xmlSetProp(pNode, m_aAttrPtr->name, xValue); diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index e404a1952b8c..bb8477e3eded 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -317,12 +317,6 @@ namespace DOM ::osl::MutexGuard const g(m_Mutex); - // encoding... - /* - xmlChar *encstr = (xmlChar*) OUStringToOString(src.sEncoding, RTL_TEXTENCODING_UTF8).getStr(); - xmlCharEncoding enc = xmlParseCharEncoding(encstr); - */ - ::boost::shared_ptr const pContext( xmlNewParserCtxt(), xmlFreeParserCtxt); -- cgit v1.2.3