[Libreoffice-commits] core.git: unoxml/source
Caolán McNamara
caolanm at redhat.com
Thu Jan 4 21:22:34 UTC 2018
unoxml/source/dom/element.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 73cd2cf7d1707e464f13c28b6ec583c484fd3f46
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jan 4 11:09:54 2018 +0000
ofz#4940 Null-dereference READ
Change-Id: I2c8c83ef6ffde5f1599814538acc36ec5beab6c8
Reviewed-on: https://gerrit.libreoffice.org/47387
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index fa4ef9ce4670..f7cae19fdbdc 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -132,7 +132,7 @@ namespace DOM
RTL_TEXTENCODING_UTF8));
}
- const xmlChar* pPrefix = m_aNodePtr->ns ? m_aNodePtr->ns->prefix : reinterpret_cast<const xmlChar*>("");
+ const xmlChar* pPrefix = (m_aNodePtr->ns && m_aNodePtr->ns->prefix) ? m_aNodePtr->ns->prefix : reinterpret_cast<const xmlChar*>("");
const xmlChar* pName = m_aNodePtr->name;
sal_Int32 nElementToken=FastToken::DONTKNOW;
if( strlen(reinterpret_cast<char const *>(pPrefix)) )
More information about the Libreoffice-commits
mailing list