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:30:04 +0100
commitaf00fce7c50afabf778580e842d3487650f00e96 (patch)
tree73fbe98a9d497c3904c42e6e4145de9a1d186fee
parent039dadf3b48484ba5d1fc71de5561288e6b7c5cb (diff)
check string bounds
Change-Id: I92f2dbbe12956ee9432d592851f10bceaa5ce25d (cherry picked from commit 4e75f724cc59d457cdd905c68666633e3b2612f4)
-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