mirror of
https://github.com/reactos/reactos.git
synced 2024-07-06 20:55:16 +00:00
[RPCRT4]
Fix a bug that corrupted in-parameters when a remote function is called. If the in-parameter is an array of UNICODE_STRINGS, the bug terminates all strings at the length of the first string. For example, when LsaLookupNames is called in order to retrieve the SIDs of the "Guest" and "Administrator" users, the remote function received the strings "Guest" and "Admin". The patch will be sent to the WINE project after a similar bug for out-parameters has been fixed too. svn path=/trunk/; revision=59038
This commit is contained in:
parent
6a814d763b
commit
bbf97892df
|
@ -1210,7 +1210,7 @@ static unsigned char * EmbeddedPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
|
||||||
unsigned char *bufptr = bufbase + *(const SHORT*)&info[2];
|
unsigned char *bufptr = bufbase + *(const SHORT*)&info[2];
|
||||||
unsigned char *saved_memory = pStubMsg->Memory;
|
unsigned char *saved_memory = pStubMsg->Memory;
|
||||||
|
|
||||||
pStubMsg->Memory = pMemory;
|
pStubMsg->Memory = membase;
|
||||||
PointerMarshall(pStubMsg, bufptr, *(unsigned char**)memptr, info+4);
|
PointerMarshall(pStubMsg, bufptr, *(unsigned char**)memptr, info+4);
|
||||||
pStubMsg->Memory = saved_memory;
|
pStubMsg->Memory = saved_memory;
|
||||||
}
|
}
|
||||||
|
@ -1362,7 +1362,7 @@ static void EmbeddedPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
|
||||||
unsigned char *memptr = membase + *(const SHORT*)&info[0];
|
unsigned char *memptr = membase + *(const SHORT*)&info[0];
|
||||||
unsigned char *saved_memory = pStubMsg->Memory;
|
unsigned char *saved_memory = pStubMsg->Memory;
|
||||||
|
|
||||||
pStubMsg->Memory = pMemory;
|
pStubMsg->Memory = membase;
|
||||||
PointerBufferSize(pStubMsg, *(unsigned char**)memptr, info+4);
|
PointerBufferSize(pStubMsg, *(unsigned char**)memptr, info+4);
|
||||||
pStubMsg->Memory = saved_memory;
|
pStubMsg->Memory = saved_memory;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,24 @@ Index: ndr_marshall.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- ndr_marshall.c (working copy)
|
--- ndr_marshall.c (working copy)
|
||||||
+++ ndr_marshall.c (working copy)
|
+++ ndr_marshall.c (working copy)
|
||||||
|
@@ -1210,7 +1210,7 @@
|
||||||
|
unsigned char *bufptr = bufbase + *(const SHORT*)&info[2];
|
||||||
|
unsigned char *saved_memory = pStubMsg->Memory;
|
||||||
|
|
||||||
|
- pStubMsg->Memory = pMemory;
|
||||||
|
+ pStubMsg->Memory = membase;
|
||||||
|
PointerMarshall(pStubMsg, bufptr, *(unsigned char**)memptr, info+4);
|
||||||
|
pStubMsg->Memory = saved_memory;
|
||||||
|
}
|
||||||
|
@@ -1362,7 +1362,7 @@
|
||||||
|
unsigned char *memptr = membase + *(const SHORT*)&info[0];
|
||||||
|
unsigned char *saved_memory = pStubMsg->Memory;
|
||||||
|
|
||||||
|
- pStubMsg->Memory = pMemory;
|
||||||
|
+ pStubMsg->Memory = membase;
|
||||||
|
PointerBufferSize(pStubMsg, *(unsigned char**)memptr, info+4);
|
||||||
|
pStubMsg->Memory = saved_memory;
|
||||||
|
}
|
||||||
@@ -6159,6 +6159,7 @@ static LONG unmarshall_discriminant(PMID
|
@@ -6159,6 +6159,7 @@ static LONG unmarshall_discriminant(PMID
|
||||||
case RPC_FC_WCHAR:
|
case RPC_FC_WCHAR:
|
||||||
case RPC_FC_SHORT:
|
case RPC_FC_SHORT:
|
||||||
|
|
Loading…
Reference in a new issue