[Libreoffice-commits] core.git: forms/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 13 16:14:18 UTC 2021
forms/source/xforms/model_ui.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit a5bdce555ad7e5bd480c7bd63159869b7a9bc3d3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 13 14:52:27 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu May 13 18:13:37 2021 +0200
comment on suspicious code
Change-Id: I92b16c22815a755ec23503db1b8f7bb3444f89e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115560
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index 4592fa3efe97..7f39a9f6ed99 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -610,6 +610,8 @@ css::uno::Reference<css::xml::dom::XNode> Model::renameNode( const css::uno::Ref
Reference<XNamedNodeMap> xMap = xNode->getAttributes();
sal_Int32 nLength = xMap.is() ? xMap->getLength() : 0;
+ // looping until nLength is suspicious wrt removeAttributeNode
+ // presumably shrinking XNamedNodeMap::getLength by 1
for( sal_Int32 n = 0; n < nLength; n++ )
{
Reference<XAttr> xAttr( xMap->item(n), UNO_QUERY );
More information about the Libreoffice-commits
mailing list