Rob Shearman : rpcrt4: The conformant array offset in complex structs should be signed.
Alexandre Julliard
julliard at winehq.org
Fri Jul 4 13:59:17 CDT 2008
Module: wine
Branch: master
Commit: 81b4436addfe02eb9f4f68a5cec877a2103a9b76
URL: http://source.winehq.org/git/wine.git/?a=commit;h=81b4436addfe02eb9f4f68a5cec877a2103a9b76
Author: Rob Shearman <robertshearman at gmail.com>
Date: Thu Jul 3 23:27:00 2008 +0100
rpcrt4: The conformant array offset in complex structs should be signed.
---
dlls/rpcrt4/ndr_marshall.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index c044ace..41d5f31 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -2819,7 +2819,7 @@ unsigned char * WINAPI NdrComplexStructMarshall(PMIDL_STUB_MESSAGE pStubMsg,
ALIGN_POINTER_CLEAR(pStubMsg->Buffer, pFormat[1] + 1);
pFormat += 4;
- if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat;
+ if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat;
pFormat += 2;
if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat;
pFormat += 2;
@@ -2887,7 +2887,7 @@ unsigned char * WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
*ppMemory = NdrAllocate(pStubMsg, size);
pFormat += 4;
- if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat;
+ if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat;
pFormat += 2;
if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat;
pFormat += 2;
@@ -2943,7 +2943,7 @@ void WINAPI NdrComplexStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
}
pFormat += 4;
- if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat;
+ if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat;
pFormat += 2;
if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat;
pFormat += 2;
@@ -2979,7 +2979,7 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
ALIGN_POINTER(pStubMsg->Buffer, pFormat[1] + 1);
pFormat += 4;
- if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat;
+ if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat;
pFormat += 4;
ComplexStructMemorySize(pStubMsg, pFormat);
@@ -3004,7 +3004,7 @@ void WINAPI NdrComplexStructFree(PMIDL_STUB_MESSAGE pStubMsg,
TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat);
pFormat += 4;
- if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat;
+ if (*(const SHORT*)pFormat) conf_array = pFormat + *(const SHORT*)pFormat;
pFormat += 2;
if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat;
pFormat += 2;
More information about the wine-cvs
mailing list