From 4ffa47d9c1dafac4712b7fcac9a7df25b3392386 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Tue, 11 Feb 2014 00:32:32 +0100 Subject: fix crash when importing unsupported macro content, related fdo#59374 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I960c8174454074fd9ddb27fb17244d782c4cb24c Reviewed-on: https://gerrit.libreoffice.org/8038 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- basic/source/comp/token.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index bc0519dfeb00..51633c8e2ff7 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -359,6 +359,12 @@ SbiToken SbiTokenizer::Next() { return eCurTok = FIXSTRING; } + else if( aSym.isEmpty() ) + { + //something went wrong + bEof = bEos = true; + return eCurTok = EOLN; + } // Special cases of characters that are between "Z" and "a". ICompare() // evaluates the position of these characters in different ways. else if( aSym[0] == '^' ) -- cgit v1.2.3