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

resolved rhbz#783556 crash in ScMatrix::GetDimensons() from ScInterpreter

* Interpreter tried to access a nonexistent matrix for external reference.
* In ScInterpreter::PopExternalDoubleRef(ScMatrixRef& rMat) set error for
  unexpected conditions. In caller or descendants check for error or presence
  of ScMatrix.
üst 5cde352b
......@@ -1285,6 +1285,8 @@ ScDBRangeBase* ScInterpreter::PopDBDoubleRef()
pMat = PopMatrix();
else
PopExternalDoubleRef(pMat);
if (nGlobalError)
break;
return new ScDBExternalRange(pDok, pMat);
}
default:
......@@ -1541,7 +1543,14 @@ void ScInterpreter::PopExternalDoubleRef(ScMatrixRef& rMat)
// references, which means the array should only contain a
// single matrix token.
ScToken* p = static_cast<ScToken*>(pArray->First());
rMat = p->GetMatrix();
if (!p || p->GetType() != svMatrix)
SetError( errIllegalParameter);
else
{
rMat = p->GetMatrix();
if (!rMat)
SetError( errUnknownVariable);
}
}
void ScInterpreter::GetExternalDoubleRef(
......
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