summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-06-27 10:00:13 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-06-27 15:51:45 +0200
commit83923eb10c198ae86e20bf9eb7def400a8c08268 (patch)
treed179f4fdaf81697d781f82ed6ad57959ab9a0464
parenttdf#148820 sc: fix conditional formatted cell color (diff)
downloadcore-83923eb10c198ae86e20bf9eb7def400a8c08268.tar.gz
core-83923eb10c198ae86e20bf9eb7def400a8c08268.zip
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>
-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 773fecdda521..2aa50c5cab92 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4296,7 +4296,7 @@ static OUString lcl_ExtractVariableAndHint( 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 "