diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-08 09:14:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-08 12:16:15 +0100 |
commit | 8fc98bb35b38da07018de1dcaa39be419019b5e6 (patch) | |
tree | 7af6b29aaef62cf2094d88a777b322b6da07a585 /svtools | |
parent | adf3cf074e05e633e907f72215d56720c01fd2db (diff) |
ofz#4113 Null-dereference READ
Change-Id: If586bd265e323b5c2a308c2e853456c2778e8cb0
Reviewed-on: https://gerrit.libreoffice.org/44448
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.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index bcdb67b4600e..a29e571383b9 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -159,9 +159,11 @@ int SvRTFParser::GetNextToken_() if( 0 <= nTokenValue ) { nUCharOverread = (sal_uInt8)nTokenValue; - //cmc: other ifdef breaks #i3584 - aParserStates.top(). - nUCharOverread = nUCharOverread; + if (!aParserStates.empty()) + { + //cmc: other ifdef breaks #i3584 + aParserStates.top().nUCharOverread = nUCharOverread; + } } aToken.clear(); // #i47831# erase token to prevent the token from being treated as text // read next token |