From a91be216f2effc87a7887490939a5218a31f1cb7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 31 Dec 2013 20:48:36 +0000 Subject: don't access beyond end of empty string Change-Id: Ie772d7a60fd65b93ca66c543eb2786ce7f109004 (cherry picked from commit 978172bb00529b6283502abf7552fb0e828a7df5) --- basctl/source/basicide/brkdlg.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'basctl') 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; -- cgit v1.2.3