diff options
author | Eike Rathke <erack@redhat.com> | 2013-12-07 00:28:01 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-12-07 00:28:01 +0100 |
commit | 4e75f724cc59d457cdd905c68666633e3b2612f4 (patch) | |
tree | c4f4b38057f4d90aad36db2c5505ad27b23df91e | |
parent | 2212051e792cb5f51f4191afe83c85fc3730a087 (diff) |
check string bounds
Change-Id: I92f2dbbe12956ee9432d592851f10bceaa5ce25d
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 4 |
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 |