From 0f874472c672175135520101837ff0c9d4701d7f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 17 Oct 2019 20:33:50 +0200 Subject: size some stringbuffer to prevent re-alloc found by the simple expidient of putting asserts in the resize routine. Where an explicit const size is used, I started with 32 and kept doubling until that site did not need resizing anymore. Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4 Reviewed-on: https://gerrit.libreoffice.org/81138 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unotools/source/config/pathoptions.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unotools') diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx index 4219c8c44033..b6e5006ce39c 100644 --- a/unotools/source/config/pathoptions.cxx +++ b/unotools/source/config/pathoptions.cxx @@ -236,7 +236,7 @@ const OUString& SvtPathOptions_Impl::GetPath( SvtPathOptions::Paths ePath ) ePath == SvtPathOptions::PATH_ICONSET) { auto ctx = comphelper::getProcessComponentContext(); - OUStringBuffer buf; + OUStringBuffer buf(aPathValue.getLength()*2); for (sal_Int32 i = 0;;) { buf.append( -- cgit