summaryrefslogtreecommitdiff
path: root/xmloff/source/core
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-06-30 23:49:03 +0200
committerEike Rathke <erack@redhat.com>2022-07-01 00:48:15 +0200
commitd031accf712cde8f664828ec4547bf6a4661860f (patch)
tree28ab268136865804b5aa6b83349b28f387c5617c /xmloff/source/core
parent8480e15f854cfc0a6b99a6b28f794465d0fb8253 (diff)
Check sax::Converter::parseDateTime() success return value
Change-Id: Ia843a1437a8c97e2dafc3f22d43a3dc61873269b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136686 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'xmloff/source/core')
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index b21010b07c81..9052a8dbaa81 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -462,8 +462,10 @@ void XMLConfigItemContext::endFastElement(sal_Int32 )
else if (IsXMLToken(msType, XML_DATETIME))
{
util::DateTime aDateTime;
- ::sax::Converter::parseDateTime(aDateTime, sValue);
- mrAny <<= aDateTime;
+ if (::sax::Converter::parseDateTime(aDateTime, sValue))
+ mrAny <<= aDateTime;
+ else
+ SAL_WARN("xmloff.core", "XMLConfigItemContext: broken DateTime '" << sValue << "'");
}
else if (IsXMLToken(msType, XML_BASE64BINARY))
{