[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - svtools/source

Caolán McNamara caolanm at redhat.com
Fri Nov 3 09:44:55 UTC 2017


 svtools/source/svrtf/parrtf.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a6dc83081d95deddb9906d8b577a21fcf41d25f3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 2 14:02:18 2017 +0000

    Infinite loop in ooo32227-1.rtf with calc rtf filter
    
    Change-Id: I068b205c844296379b5641356e4087b17f0a3535
    Reviewed-on: https://gerrit.libreoffice.org/44235
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 17921cdaf718..9d3a03087d1c 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -336,7 +336,9 @@ void SvRTFParser::ScanText()
                             sal_Char nSlash = '\\';
                             while (!bBreak)
                             {
-                                wchar_t next=GetNextChar();
+                                auto next = GetNextChar();
+                                if (sal_Unicode(EOF) == next)
+                                    break;
                                 if (next>0xFF) // fix for #i43933# and #i35653#
                                 {
                                     if (!aByteString.isEmpty())


More information about the Libreoffice-commits mailing list