diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-06-27 10:00:13 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-09-23 14:27:39 +0200 |
commit | 2443d2ce0a819f7ea083b1aba5f56f7ac74b0696 (patch) | |
tree | 7841f63cec76f28842eaf17df42ced835e63510e /writerfilter | |
parent | db668c576021d2faaab4f418e2c95a10a7217b90 (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.cxx | 2 |
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 " |