diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-16 12:29:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-16 16:25:35 +0200 |
commit | 05cc10da5fe10e712dd6252bbd039856059263af (patch) | |
tree | ab7d7f3b6ee04d1cf09c157a427b08d189c63e58 /svtools | |
parent | c883d5e073d2ac5b2d55126c929d7bf3e6d295e8 (diff) |
ofz#9691 infinite-loop
Change-Id: Ifab7271c20104e0e073f68d8a570bceb9d8f387a
Reviewed-on: https://gerrit.libreoffice.org/59168
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/svrtf/parrtf.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index bff4bcacc54e..7360c77ede37 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -174,8 +174,13 @@ int SvRTFParser::GetNextToken_() if (!_inSkipGroup) { // UPR - overread the group with the ansi // information - while( '{' != GetNextToken_() ) - ; + int nNextToken; + do + { + nNextToken = GetNextToken_(); + } + while (nNextToken != '{' && nNextToken != sal_Unicode(EOF)); + SkipGroup(); GetNextToken_(); // overread the last bracket nRet = 0; |