rpcrt4: Preserve the previous MaxCount value when computing variance through a callback.
This commit is contained in:
parent
86d381a56b
commit
fa847909f2
|
@ -590,6 +590,8 @@ PFORMAT_STRING ComputeConformanceOrVariance(
|
||||||
case RPC_FC_CALLBACK:
|
case RPC_FC_CALLBACK:
|
||||||
{
|
{
|
||||||
unsigned char *old_stack_top = pStubMsg->StackTop;
|
unsigned char *old_stack_top = pStubMsg->StackTop;
|
||||||
|
ULONG_PTR max_count, old_max_count = pStubMsg->MaxCount;
|
||||||
|
|
||||||
pStubMsg->StackTop = ptr;
|
pStubMsg->StackTop = ptr;
|
||||||
|
|
||||||
/* ofs is index into StubDesc->apfnExprEval */
|
/* ofs is index into StubDesc->apfnExprEval */
|
||||||
|
@ -599,7 +601,9 @@ PFORMAT_STRING ComputeConformanceOrVariance(
|
||||||
pStubMsg->StackTop = old_stack_top;
|
pStubMsg->StackTop = old_stack_top;
|
||||||
|
|
||||||
/* the callback function always stores the computed value in MaxCount */
|
/* the callback function always stores the computed value in MaxCount */
|
||||||
*pCount = pStubMsg->MaxCount;
|
max_count = pStubMsg->MaxCount;
|
||||||
|
pStubMsg->MaxCount = old_max_count;
|
||||||
|
*pCount = max_count;
|
||||||
goto finish_conf;
|
goto finish_conf;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue