summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-02 19:32:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-03 10:02:20 +0100
commit79aaf5a7a181ff701dc19b8978c989ff49908712 (patch)
tree40a60481ed0bc2783102cbd07ad5c3c3ebe97dc1 /svtools
parent64024d7c18bd114eb9958cf80eea9129e09923bd (diff)
ofz: crash with empty aParserStates
Change-Id: Ie3f327605ce795da30f915969177f21a7d38824c Reviewed-on: https://gerrit.libreoffice.org/44232 Tested-by: Jenkins <ci@libreoffice.org> 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.cxx3
1 files changed, 2 insertions, 1 deletions
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;
}