Commit 4c36f799 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

rpcrt4: Fixed array_compute_and_size_conformance on strings (Coverity).

parent 8d44d638
...@@ -1778,7 +1778,7 @@ static inline void array_compute_and_size_conformance( ...@@ -1778,7 +1778,7 @@ static inline void array_compute_and_size_conformance(
break; break;
case RPC_FC_C_CSTRING: case RPC_FC_C_CSTRING:
case RPC_FC_C_WSTRING: case RPC_FC_C_WSTRING:
if (pFormat[0] == RPC_FC_C_CSTRING) if (fc == RPC_FC_C_CSTRING)
{ {
TRACE("string=%s\n", debugstr_a((const char *)pMemory)); TRACE("string=%s\n", debugstr_a((const char *)pMemory));
pStubMsg->ActualCount = strlen((const char *)pMemory)+1; pStubMsg->ActualCount = strlen((const char *)pMemory)+1;
...@@ -1789,7 +1789,7 @@ static inline void array_compute_and_size_conformance( ...@@ -1789,7 +1789,7 @@ static inline void array_compute_and_size_conformance(
pStubMsg->ActualCount = strlenW((LPCWSTR)pMemory)+1; pStubMsg->ActualCount = strlenW((LPCWSTR)pMemory)+1;
} }
if (fc == RPC_FC_STRING_SIZED) if (pFormat[1] == RPC_FC_STRING_SIZED)
pFormat = ComputeConformance(pStubMsg, pMemory, pFormat + 2, 0); pFormat = ComputeConformance(pStubMsg, pMemory, pFormat + 2, 0);
else else
pStubMsg->MaxCount = pStubMsg->ActualCount; pStubMsg->MaxCount = pStubMsg->ActualCount;
......
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