summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-12-07 00:28:01 +0100
committerEike Rathke <erack@redhat.com>2013-12-07 00:28:01 +0100
commit4e75f724cc59d457cdd905c68666633e3b2612f4 (patch)
treec4f4b38057f4d90aad36db2c5505ad27b23df91e
parent2212051e792cb5f51f4191afe83c85fc3730a087 (diff)
check string bounds
Change-Id: I92f2dbbe12956ee9432d592851f10bceaa5ce25d
-rw-r--r--sc/source/core/data/dpobject.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 83532e26e054..cb107ba1490d 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