vcl/workben/fftester.cxx | 2 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit 4e32e8900e59f9751a60d9fdef80cdf7d500f72f Author: Caolán McNamara <[email protected]> Date: Fri Mar 24 13:03:50 2017 +0000 Resolves: tdf#106724 crash when Title property doesn't already exist because we just write past the end instead of resizing before hand Change-Id: I4742980a331b14ca39aff8aa6cfc27db154091ff diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index c51659eec07f..c64d9de17889 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4373,31 +4373,31 @@ void DomainMapper_Impl::SetFieldResult(OUString const& rResult) uno::Sequence<beans::PropertyValue> aValues ; aProperty >>= aValues; beans::PropertyValue propertyVal; - bool bTitleFound = false; - int i=0; - for (; i < aValues.getLength(); i++) + sal_Int32 nTitleFoundIndex = -1; + for (sal_Int32 i = 0; i < aValues.getLength(); ++i) { propertyVal = aValues[i]; - if(propertyVal.Name == "Title") + if (propertyVal.Name == "Title") { - bTitleFound = true; + nTitleFoundIndex = i; break; } } - if(bTitleFound) + if (nTitleFoundIndex != -1) { OUString titleStr; uno::Any aValue(propertyVal.Value); aValue >>= titleStr; titleStr = titleStr + rResult; propertyVal.Value <<= titleStr; - aValues[i] = propertyVal; + aValues[nTitleFoundIndex] = propertyVal; } else { + aValues.realloc(aValues.getLength() + 1); propertyVal.Name = "Title"; propertyVal.Value <<= rResult; - aValues[i] = propertyVal; + aValues[aValues.getLength() - 1] = propertyVal; } xFieldProperties->setPropertyValue("Fields", uno::makeAny(aValues)); commit f233ec000bd39a55fc1ac79717b85d6dd103b7d5 Author: Caolán McNamara <[email protected]> Date: Fri Mar 24 12:02:25 2017 +0000 update fftester documentation Change-Id: I091491a628b267a18d044d770a28a6b9e96f39f4 diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index d6d74f7e48aa..51b518fa3351 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -22,7 +22,7 @@ export CXX=afl-clang-fast++ make cp workdir/LinkTarget/Executable/fftester instdir/program - LD_LIBRARY_PATH=`pwd`/instdir/program SAL_USE_VCLPLUGIN=svp AFL_PERSISTENT=1 afl-fuzz -t 50 -i ~/fuzz/in.png -o ~/fuzz/out.png -d -T png -m 50000000 instdir/program/fftester @@ png + LD_LIBRARY_PATH=`pwd`/instdir/program AFL_PERSISTENT=1 afl-fuzz -t 50 -i ~/fuzz/in.png -o ~/fuzz/out.png -d -T png -m 50000000 instdir/program/fftester @@ png On slower file formats like .doc you can probably drop the -t and rely on the estimations, on faster file formats ironically not specifying a timeout will
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
