summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-14 10:01:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-14 10:03:34 +0100
commitd328afa3441c99f8be85adbb78099c198e8d35ec (patch)
tree037f4e9065ec424517fbcd095deb9cb60e7caf5e /writerfilter
parentb00d1e37c8d178f8199a45d1c9f08cae6bcef698 (diff)
crashtesting: Error: attempt to increment a singular iterator
revert commit 96fab0513215cc416e96e1b2089466afd0d2791c Author: Noel Grandin <noel@peralex.com> Date: Thu May 12 10:07:50 2016 +0200 clang-tidy modernize-loop-convert in writerfilter to xmlsecurity for OOXMLPropertySet::resolve which modifies the mProperties it iterates over e.g. fdo67086-1.docx, fdo72640-6.docx etc Change-Id: I14f829d1425d56110c0aa8d42e751bd2f1d3dd2a
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySet.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
index 73dd505ffdb3..81e52ace7594 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
@@ -354,8 +354,10 @@ void OOXMLPropertySet::resolve(Properties & rHandler)
// be appended to mProperties. I don't think it can cause elements
// to be deleted. But let's check with < here just to be safe that
// the indexing below works.
- for (OOXMLProperty::Pointer_t& pProp : mProperties)
+ for (size_t nIt = 0; nIt < mProperties.size(); ++nIt)
{
+ OOXMLProperty::Pointer_t pProp = mProperties[nIt];
+
if (pProp.get() != nullptr)
pProp->resolve(rHandler);
}