summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-06-27 10:00:13 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-09-23 14:27:39 +0200
commit2443d2ce0a819f7ea083b1aba5f56f7ac74b0696 (patch)
tree7841f63cec76f28842eaf17df42ced835e63510e /writerfilter
parentdb668c576021d2faaab4f418e2c95a10a7217b90 (diff)
crashtesting: fix assert seen with forum-mso-en-8349.docx
a string that ends in spaces Change-Id: I808f046be816d0d4a76f801a349e284024a2061c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136465 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 83923eb10c198ae86e20bf9eb7def400a8c08268)
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2506a9609206..71709f775ec8 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2621,7 +2621,7 @@ static OUString lcl_ExctractVariableAndHint( const OUString& rCommand, OUString&
sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK'
if (nIndex == -1)
return OUString();
- while(rCommand[nIndex] == ' ')
+ while (nIndex < rCommand.getLength() && rCommand[nIndex] == ' ')
++nIndex;
OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK "