[Libreoffice-commits] core.git: basctl/source

Caolán McNamara caolanm at redhat.com
Tue Dec 31 12:49:42 PST 2013


 basctl/source/basicide/brkdlg.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 978172bb00529b6283502abf7552fb0e828a7df5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 31 20:48:36 2013 +0000

    don't access beyond end of empty string
    
    Change-Id: Ie772d7a60fd65b93ca66c543eb2786ce7f109004

diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index 7acaa5b..f8dfe9f 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;


More information about the Libreoffice-commits mailing list