From 05cc10da5fe10e712dd6252bbd039856059263af Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 16 Aug 2018 12:29:12 +0100 Subject: ofz#9691 infinite-loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifab7271c20104e0e073f68d8a570bceb9d8f387a Reviewed-on: https://gerrit.libreoffice.org/59168 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- svtools/source/svrtf/parrtf.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'svtools') 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; -- cgit