diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-04 11:09:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-04 22:22:05 +0100 |
commit | 73cd2cf7d1707e464f13c28b6ec583c484fd3f46 (patch) | |
tree | 93f81c57a96b166380b44dfd39c1c42a28644497 /unoxml | |
parent | 85cbefac5bb6631927e29aac9e27fbf07a280a4e (diff) |
ofz#4940 Null-dereference READ
Change-Id: I2c8c83ef6ffde5f1599814538acc36ec5beab6c8
Reviewed-on: https://gerrit.libreoffice.org/47387
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/source/dom/element.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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)) ) |