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

ofz: guard against binary crap argument counts and ID/OpCode generation

Same as in sc/source/filter/lotus/lotform.cxx LotusToSc::DoFunc()

Change-Id: I4972e065ab96abdea42d64481d4e30674230ab99
üst e80da608
......@@ -94,8 +94,12 @@ void QProToSc::DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtStr
if( nArgs < nBufSize )
{
for( nCount = 0; nCount < nArgs ; nCount++ )
for( nCount = 0; nCount < nArgs && aStack.HasMoreTokens() ; nCount++ )
aStack >> eParam[ nCount ];
if (nCount < nArgs)
// Adapt count to reality. All sort of binary crap is possible.
nArgs = static_cast<sal_uInt16>(nCount);
}
else
return;
......
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