Kaydet (Commit) 4e75f724 authored tarafından Eike Rathke's avatar Eike Rathke

check string bounds

Change-Id: I92f2dbbe12956ee9432d592851f10bceaa5ce25d
üst 2212051e
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment