diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-30 09:22:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-30 12:12:00 +0200 |
commit | 6669c1a06bcc3ce31c9c17c714fdf2c2e0e25360 (patch) | |
tree | 0619f346098c2599c3b482c17e2f3eebf41c8831 | |
parent | ba4244e834dfdac5488023cc2f62bb83fbd2d011 (diff) |
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I99d8b2a831f54e9748954bdc946f0f29b250a6a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121265
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index fbe537dd424b..0ab223b3c109 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -891,8 +891,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( if( aIter.toView().find( '%' ) != std::string_view::npos ) { sal_Int32 nTmp; - ::sax::Converter::convertPercent( nTmp, aIter.toView() ); - nRelWidth = static_cast<sal_Int16>(nTmp); + if (::sax::Converter::convertPercent(nTmp, aIter.toView())) + nRelWidth = static_cast<sal_Int16>(nTmp); } else { @@ -917,8 +917,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( if( aIter.toView().find( '%' ) != std::string_view::npos ) { sal_Int32 nTmp; - ::sax::Converter::convertPercent( nTmp, aIter.toView() ); - nRelWidth = static_cast<sal_Int16>(nTmp); + if (::sax::Converter::convertPercent(nTmp, aIter.toView())) + nRelWidth = static_cast<sal_Int16>(nTmp); } else { @@ -933,8 +933,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( if( aIter.toView().find( '%' ) != std::string_view::npos ) { sal_Int32 nTmp; - ::sax::Converter::convertPercent( nTmp, aIter.toView() ); - nRelHeight = static_cast<sal_Int16>(nTmp); + if (::sax::Converter::convertPercent(nTmp, aIter.toView())) + nRelHeight = static_cast<sal_Int16>(nTmp); } else { @@ -964,8 +964,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( if( aIter.toView().find( '%' ) != std::string_view::npos ) { sal_Int32 nTmp; - ::sax::Converter::convertPercent( nTmp, aIter.toView() ); - nRelHeight = static_cast<sal_Int16>(nTmp); + if (::sax::Converter::convertPercent(nTmp, aIter.toView())) + nRelHeight = static_cast<sal_Int16>(nTmp); } else { |