[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - sc/source
Eike Rathke
erack at redhat.com
Fri Dec 6 16:54:32 PST 2013
sc/source/core/data/dpobject.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 81cf658ed61493e2c783d9d57cd1af144518f1a5
Author: Eike Rathke <erack at redhat.com>
Date: Sat Dec 7 00:28:01 2013 +0100
check string bounds
Change-Id: I92f2dbbe12956ee9432d592851f10bceaa5ce25d
(cherry picked from commit 4e75f724cc59d457cdd905c68666633e3b2612f4)
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 773644c..677ccd5 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1541,7 +1541,7 @@ bool isAtStart(
while (nStartPos < nListLen && rList[nStartPos] == ' ')
++nStartPos;
- if (rList[nStartPos] == '\'') // quoted within the brackets?
+ if (nStartPos < nListLen && rList[nStartPos] == '\'') // quoted within the brackets?
{
if ( dequote( rList, nStartPos, nQuoteEnd, aDequoted ) )
{
@@ -1760,7 +1760,7 @@ bool ScDPObject::ParseFilters(
aRemaining = comphelper::string::stripStart(aRemaining, ' ');
// field name has to be followed by item name in brackets
- if (aRemaining[0] == '[')
+ if (!aRemaining.isEmpty() && aRemaining[0] == '[')
{
bHasFieldName = true;
// bUsed remains false - still need the item
More information about the Libreoffice-commits
mailing list