[Libreoffice-commits] core.git: svtools/source

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


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

New commits:
commit 79aaf5a7a181ff701dc19b8978c989ff49908712
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 2 19:32:16 2017 +0000

    ofz: crash with empty aParserStates
    
    Change-Id: Ie3f327605ce795da30f915969177f21a7d38824c
    Reviewed-on: https://gerrit.libreoffice.org/44232
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 7db60878a9e4..7ef29c77e289 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -447,7 +447,8 @@ void SvRTFParser::ScanText()
                                     nNextCh = GetNextChar();
                                 } while ( RTF_ISDIGIT( nNextCh ) );
                                 nUCharOverread = nNewOverread;
-                                aParserStates.top().nUCharOverread = nNewOverread;
+                                if (!aParserStates.empty())
+                                    aParserStates.top().nUCharOverread = nNewOverread;
                             }
                             bNextCh = 0x20 == nNextCh;
                         }


More information about the Libreoffice-commits mailing list