summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-03-24 09:33:44 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2022-05-12 14:16:22 +0200
commit49338de81df75cf2489bd2da6f0001596ed51451 (patch)
treecd824535c8950d735cfba0e066b47a7215da8607
parent0d1c4596c4d2a293c6093c0351d1da714282a91d (diff)
forcepoint#85 Conditional jump or move depends on uninitialised value
==398461== by 0xCDC7960: (anonymous namespace)::CopyUntil(char16_t*&, char16_t const*&, char16_t, bool) (strhelper.cxx:88) ==398461== by 0xCDC839F: psp::WhitespaceToSpace(rtl::OUString const&, bool) (strhelper.cxx:294) ==398461== by 0xCB54980: vcl::PDFWriterImpl::setOutlineItemText(int, rtl::OUString const&) (pdfwriter_impl.cxx:9875) ==398461== by 0xCB547FF: vcl::PDFWriterImpl::createOutlineItem(int, rtl::OUString const&, int) (pdfwriter_impl.cxx:9851) ==398461== by 0xCAF39B0: vcl::PDFWriter::CreateOutlineItem(int, rtl::OUString const&, int) (pdfwriter.cxx:383) ==398461== by 0xCABD7C8: vcl::GlobalSyncData::PlayGlobalActions(vcl::PDFWriter&) (pdfextoutdevdata.cxx:250) ==398461== by 0xCAC0628: vcl::PDFExtOutDevData::PlayGlobalActions(vcl::PDFWriter&) (pdfextoutdevdata.cxx:616) ==398461== by 0x3D06EA0F: PDFExport::Export(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (pdfexport.cxx:1004) Change-Id: I6bc086997851ee06531a4a9ae263e2b26edfba84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132036 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 9d5703aa0b7d11db3568a2e0aaa462fe2dd98867) (cherry picked from commit cc00d0031e1eff6899fd226c42fcc56ced8a61dd)
-rw-r--r--vcl/source/helper/strhelper.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index 4d0f1d993cd6..55c36955731f 100644
--- a/vcl/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -84,7 +84,8 @@ inline void CopyUntil( sal_Unicode*& pTo, const sal_Unicode*& pFrom, sal_Unicode
*pTo = *pFrom;
pTo++;
}
- pFrom++;
+ if( *pFrom )
+ pFrom++;
} while( *pFrom && *pFrom != cUntil );
// copy the terminating character unless zero or protector
if( ! isProtect( *pFrom ) || bIncludeUntil )