summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-31 20:48:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-31 20:49:12 +0000
commit978172bb00529b6283502abf7552fb0e828a7df5 (patch)
tree8c8692a6e06c45ec88ce4adcbfc319afb1b0b087
parent37488b56d33533ad6d705c6d2e16eb6b5af67f65 (diff)
don't access beyond end of empty string
Change-Id: Ie772d7a60fd65b93ca66c543eb2786ce7f109004
-rw-r--r--basctl/source/basicide/brkdlg.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index 7acaa5b1025a..f8dfe9f31788 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -47,6 +47,8 @@ bool lcl_ParseText(OUString const &rText, size_t& rLineNr )
// of just spaces.)
OUString aText(
rText.replaceAll(" ", OUString()));
+ if (aText.isEmpty())
+ return false;
sal_Unicode cFirst = aText[0];
if (cFirst != '#' && !(cFirst >= '0' && cFirst <= '9'))
return false;