Rob Shearman
37793cd550
rpcrt4: Fix the pointer saved during full pointer unmarshalling.
...
The pointer address may set by the type unmarshalling function and
therefore will not be base_ptr_val. This value is the value at
*pPointer and is what needs to be retrieved during subsequent
unmarshalling of the same function.
2009-11-18 15:14:10 +01:00
Francois Gouget
891d3ef525
rpcrt4: Fix compilation on systems that don't support nameless unions.
2009-08-31 12:41:37 +02:00
Huw Davies
70804336aa
rpcrt4: Add support for FC_ALIGNM2.
2009-08-17 16:47:24 +02:00
Alexandre Julliard
b579c48133
rpcrt4: Fix memory sizes of marshalled pointers on 64-bit.
2009-06-19 12:49:35 +02:00
Alexandre Julliard
aded9e4091
rpcrt4: Fix compiler warnings on 64-bit.
2009-05-28 11:56:30 +02:00
Alexandre Julliard
feeaf97c81
rpcrt4: Implement NdrPointerMemorySize and enable the corresponding tests.
2009-05-28 11:52:36 +02:00
Michael Stefaniuc
3b803f5390
rpcrt4: Replace some usage of the long type.
2009-04-21 13:16:31 +02:00
Rob Shearman
ae5770d366
rpcrt4: Fix a memory leak in union unmarshall functions by never passing fMustAlloc=TRUE into union_arm_unmarshall.
2009-03-23 14:54:29 +01:00
Rob Shearman
1c8c45d0f6
rpcrt4: Implement NdrRangeUnmarshall for enum types.
2009-03-23 14:54:15 +01:00
Alexandre Julliard
85f8f30a65
rpcrt4: Use RpcMsg->Buffer instead of BufferStart since the latter isn't always set.
2009-03-12 13:09:54 +01:00
Rob Shearman
689a49b52a
rpcrt4: Add a check for a NULL ref pointer to NdrPointerUnmarshall.
2009-03-11 10:29:26 +01:00
Michael Stefaniuc
e3bb1c8243
rpcrt4: Remove superfluous pointer casts.
2009-02-16 16:01:37 +01:00
Rob Shearman
78ac42bb1c
rpcrt4: Implement NdrGetUserMarshalInfo.
2009-01-28 14:16:13 +01:00
Alexandre Julliard
9876c5433f
rpcrt4: Don't align the buffer pointer in ComplexStructMemorySize for alignment formats.
2009-01-26 15:12:07 +01:00
Rob Shearman
05063ece28
rpcrt4: Don't declare functions that aren't exported by rpcrt4.dll in include/rpcndr.h.
...
NdrRangeMarshall, NdrRangeBufferSize, NdrRangeFree and
NdrByteCountPointerMemorySize should be declared static in
ndr_marshall.c instead.
2009-01-23 16:13:53 +01:00
Hans Leidekker
7df0a4ecb2
rpcrt4: Move NdrGetUserMarshalInfo stub near user marshal functions. Add documentation header.
2009-01-23 13:40:36 +01:00
Rob Shearman
59158fb25c
rpcrt4: Unmarshalling functions should always set fMustAlloc when allocating memory.
...
The memory is uninitialised and so further unmarshalling shouldn't try
to reuse any memory. fMustAlloc is always set to TRUE when allocating
memory so that it is clear that the unmarshalling is safe and to avoid
future problems with change or the code being copied.
2009-01-12 13:07:31 +01:00
Alexandre Julliard
9d09985ad1
rpcrt4: Fix an unused value warning on non-i386.
2009-01-08 17:30:09 +01:00
Francois Gouget
bbc4413548
rpcrt4: Remove WINAPI on static functions where not needed.
2008-11-26 12:10:54 +01:00
Huw Davies
c74de4a1ce
rpcrt4: Actually set an unmarshalled object ptr to NULL when a NULL pointer id is received.
2008-10-02 10:28:19 -05:00
Rob Shearman
a8f7c716ef
rpcrt4: Change type of len parameter of NdrAllocate from size_t to SIZE_T.
...
Use SIZE_T as it matches the size that Windows programs expect whereas
size_t is platform-dependent.
2008-09-08 12:51:37 +02:00
Rob Shearman
27ae234b04
rpcrt4: Remove unreachable code in EmbeddedComplexSize.
...
RPC_FC_ERROR_STATUS_T has a value of 0x10 and therefore isn't a
possible value of "flags_type & 0xf" in the switch statement.
2008-08-18 17:34:13 +02:00
Rob Shearman
2652ddfeba
rpcrt4: Re-implement part of the conformant varying structure processing routines using array_* functions.
2008-08-18 14:34:41 +02:00
Rob Shearman
b2305adc3c
rpcrt4: Factorise conformant string functions into array_* functions.
...
This allows conformant string array types to be
marshalled/unmarshalled when embedded in a complex type.
2008-08-18 14:34:40 +02:00
Rob Shearman
9e3260847a
rpcrt4: Factorise conformant varying array functions into array_* functions.
...
This allows conformant varying array types to be
marshalled/unmarshalled when embedded in a complex type.
2008-08-18 14:34:40 +02:00
Rob Shearman
9116d73c63
rpcrt4: Factorise conformant array NDR functions and use them to fix the wire-representation of complex structures with conformant arrays.
...
Factorise each conformant array function into the part that deals with
reading, writing or sizing the conformance and another part that deals
with reading, writing or sizing the variance and the element data.
This allows complex structures to use the right wire format where the
conformance appears before the structure data starts.
2008-08-18 14:34:40 +02:00
Rob Shearman
8af1dba5a9
rpcrt4: Fix the memory pointer passed into the conformant array marshaller in NdrComplexStructMarshall.
...
It needs to be the end of the memory used by the constant part of the
structure, which is returned by CompkexStructMarshall.
2008-07-16 17:54:48 +02:00
Rob Shearman
b75828fc90
rpcrt4: Clear the memory of embedded complex types in ComplexUnmarshall when fMustAlloc is TRUE to avoid passing uninitialised memory to the unmarshaller.
...
Found by Valgrind.
2008-07-07 12:11:24 +02:00
Rob Shearman
620d783680
rpcrt4: Don't reserve space in the buffer for reference pointers embedded in complex types.
...
Ref pointers don't need a pointer ID and reserving space would render
the code incompatible with other clients. Note that the pointer
marshalling/unmarshalling functions didn't actually read/write pointer
IDs to/from the reserved space in the buffer.
2008-07-04 19:49:00 +02:00
Rob Shearman
5887be5717
rpcrt4: Implement memory sizing for pointers in complex types.
2008-07-04 19:48:47 +02:00
Rob Shearman
81b4436add
rpcrt4: The conformant array offset in complex structs should be signed.
2008-07-04 19:48:38 +02:00
Rob Shearman
44649e855a
rpcrt4: Fix NdrComplexArrayUnmarshall and NdrComplexStructUnmarshall to reuse memory for embedded pointers.
2008-07-04 19:48:30 +02:00
Rob Shearman
517844e054
rpcrt4: Support calculating the size in memory of range types embedded in complex types.
2008-07-04 19:47:58 +02:00
Rob Shearman
0c095ee0d3
rpcrt4: Fix NdrConformantVaryingStructUnmarshall to use buffer memory if applicable and to reuse memory for embedded pointers.
2008-06-23 19:46:29 +02:00
Rob Shearman
33e907bc9d
rpcrt4: Factor out string validation from NDR unmarshalling functions into a separate function, validate_string_data.
2008-06-23 19:46:29 +02:00
Rob Shearman
4bde42aaa2
rpcrt4: Use abrtitrary pointer identifiers when marshalling pointers instead of using pointer values.
...
This ensures that no information about the server memory layout is
leaked to clients.
2008-06-21 11:12:58 +02:00
Rob Shearman
8e08b1dd7f
rpcrt4: Use safe_copy_from_buffer instead of direct memory copy in NdrBaseTypeUnmarshall.
...
This makes the code check that the buffer is big enough to read from
before copying the data from it. The safe_buffer_increment call is still
needed for the case where we point the memory to the buffer, so move the
call there.
2008-04-28 13:28:16 +02:00
Andrew Talbot
649c7aeb7c
rpcrt4: Remove unused variables.
2008-04-25 11:28:34 +02:00
Austin English
aab8fae59a
Spelling fixes.
2008-04-21 14:25:05 +02:00
Austin English
313a85f163
Spelling fixes.
2008-04-17 12:25:57 +02:00
Rob Shearman
e05ccfe2bb
rpcrt4: Add buffer size checks to base type unmarshalling.
...
Reimplement NdrSimpleTypeUnmarshall using similar macros to
NdrBaseTypeUnmarshalling without buffer checks, due to
NdrSimpleTypeUnmarshall not doing any safety checks.
2008-04-14 12:40:22 +02:00
Andrew Talbot
1f53b85445
rpcrt4: Void functions should not return a value.
2008-03-31 12:13:59 +02:00
Dan Hipschman
629a29d81e
rpcrt4: Handle FC_ENUM16.
2008-03-21 11:24:19 +01:00
Rob Shearman
a4b18699ac
rpcrt4: Only initialise the context handle to NULL in NdrContextHandleUnmarshall if it is an out-only or return one.
...
Fix the indentation and add tracing of the context handle flags.
2008-01-17 15:30:30 +01:00
Andrew Talbot
3c14ae6699
rpcrt4: Remove unneeded casts.
2008-01-17 13:42:14 +01:00
Rob Shearman
4f6142b8d9
rpcrt4: Handle complex arrays in calc_arg_size.
2008-01-14 15:31:37 +01:00
Rob Shearman
aabfc52573
rpcrt4: Fix the calculation of element sizes for complex arrays by using a new function ComplexStructSize that doesn't touch the buffer to calculate the size.
...
Otherwise, this would fail on arrays with a conformance or variance of zero.
2008-01-14 15:31:37 +01:00
Rob Shearman
4402daa00b
rpcrt4: Don't print fixmes for NDR types without a freeing function.
...
Not all types have a freeing function.
2008-01-14 13:39:03 +01:00
Rob Shearman
97b842c817
rpcrt4: Add support for calculating the memory size of complex types with embedded non-conformant strings.
2008-01-14 13:38:58 +01:00
Rob Shearman
23c9b6c161
rpcrt4: Add stubs for NdrCorrelationInitialize, NdrCorrelationPass and NdrCorrelationFree.
2008-01-07 22:55:34 +01:00