summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-02-11 00:32:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-02-14 10:22:27 +0000
commit4ffa47d9c1dafac4712b7fcac9a7df25b3392386 (patch)
treead4ecf312cbac406f70249b25fa8ce1ab303cd03
parent83284801a475a0ec1b98f02ee8ec46b259f35cb8 (diff)
fix crash when importing unsupported macro content, related fdo#59374
Change-Id: I960c8174454074fd9ddb27fb17244d782c4cb24c Reviewed-on: https://gerrit.libreoffice.org/8038 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--basic/source/comp/token.cxx6
1 files changed, 6 insertions, 0 deletions
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] == '^' )