Commit Graph

168 Commits

Author SHA1 Message Date
Rob Shearman 04dc115b54 rpcrt4: Handle FC_IGNORE in the base type functions. 2007-11-05 15:06:06 +01:00
Dan Hipschman 8caa325eb7 rpcrt4: Initialize allocated pointers to NULL in PointerUnmarshall.
This patch initializes allocated pointers in PointerUnmarshall since later
code checks the value for NULL (specifically, NdrConformantArrayUnmarshall).
2007-11-05 13:24:36 +01:00
Dan Hipschman acfde97b9e rpcrt4, widl: Make pointer layouts compatible with windows; fix conformant array tests. 2007-10-11 16:24:28 +02:00
Rob Shearman f67a6adf4e rpcrt4: Implement RpcSmDestroyClientContext and RpcSsDestroyClientContext. 2007-09-19 11:36:41 +02:00
Andrew Talbot fa3d623882 rpcrt4: Constify some variables. 2007-08-20 11:56:05 +02:00
Dmitry Timoshkov 12d3905427 rpcrt4: Fix the buffer bounds check. 2007-07-19 12:03:50 +02:00
Rob Shearman 2703059933 rpcrt4: Never allocate memory for the discriminant in union_arm_unmarshall as the memory is part of the union and has already been allocated. 2007-07-16 22:46:59 +02:00
Rob Shearman b44c16cc8d rpcrt4: Check to make sure there is enough data in the buffer during unmarshalling, so that the code doesn't try to read beyound the end of the buffer. 2007-07-16 22:46:55 +02:00
Rob Shearman 686c0f094c rpcrt4: Even though FC_ENUM16 is an unsigned type, the highest allowable value that can be marshalled is SHRT_MAX, not USHRT_MAX. 2007-07-16 22:46:47 +02:00
Dan Hipschman ea7b1694de rpcrt4: Allow enums as union switch types. 2007-06-26 11:59:43 +02:00
Rob Shearman 545c2a95f6 rpcrt4: Dereference the pointer passed to the marshaling/unmarshaling/sizing routines in complex types for interface pointers. 2007-06-25 23:21:55 +02:00
Rob Shearman fc124eca6e rpcrt4: Implement marshalling, unmarshalling and buffer sizing for the context handle type. 2007-06-25 23:21:55 +02:00
Rob Shearman d36f02eaa9 rpcrt4: Implement marshalling/unmarshalling for the range NDR type. 2007-06-25 23:21:54 +02:00
Rob Shearman 4174255e0c rpcrt4: Set PointerBufferMark to the buffer location immediately after the non-pointer data in complex struct and array marshaling and unmarshaling to keep to the DCE/RPC specification. 2007-06-25 23:21:54 +02:00
Rob Shearman 0f826e7cc1 rpcrt4: Use the offset to array data in embedded pointer format descriptions. 2007-06-20 13:08:30 +02:00
Dan Hipschman d2c15ed01b rpcrt4: Fix typo in union buffer size calculation. 2007-06-19 11:46:02 +02:00
Dan Hipschman 6fd05b1dc7 rpcrt4: Fix bug calculating union switch type. 2007-06-19 11:45:51 +02:00
Dan Hipschman b09b917a5c rpcrt4: Remove inaccurate comments. 2007-06-19 11:45:44 +02:00
Rob Shearman 0871ab9130 rpcrt4: Implement encapsulated union NDR functions. 2007-06-18 13:58:09 +02:00
Andrew Talbot d5d056ef75 rpcrt4: Exclude unused headers. 2007-05-18 14:11:22 +02:00
Andrew Talbot 67813450b9 rpcrt4: Replace inline static with static inline. 2007-03-23 12:29:52 +01:00
Rob Shearman b6d8b27be5 rpcrt4: The format structures used in the marshaling code should have 1-byte alignment. 2007-02-12 15:20:52 +01:00
Huw Davies e3abd2b3ff rpcrt4: Implement NdrSimpleType{Marshall,Unmarshall}. 2007-01-24 11:59:01 +01:00
Francois Gouget 5962cf6e4f rpcrt4: Add some stub documentation headers to make winapi_check happy.
Also fix some headers that identified internal APIs as external.
2006-11-13 13:00:53 +01:00
Michael Stefaniuc de21efbadd rpcrt4: Win64 printf format warning fixes. 2006-11-10 11:31:59 +01:00
Michael Stefaniuc 718f3c3505 rpcrt4: More "unsigned long" to "ULONG" changes in preparation of the removal of WINE_NO_LONG_AS_INT. 2006-11-10 11:31:45 +01:00
Michael Stefaniuc 0628fb5098 rpcrt4/ndr_marshall.c: Bring the function definitions in sync with their declaration.
Those got out of sync due to the unsigned long to ULONG migration in the headers.
2006-11-10 11:31:26 +01:00
Andrew Talbot 7147f79153 rpcrt4: Cast-qual warnings fix. 2006-09-26 11:40:33 +02:00
Huw Davies 59be6e0600 rpcrt4: Remember to skip over the conformance description. 2006-08-18 11:34:26 +02:00
Phil Lodwick dd000074fe rpcrt4: Support for SMVARRAY in EmbeddedComplexSize. 2006-07-25 11:31:59 +02:00
Robert Shearman 5700fe8a61 rpcrt4: Set BufferMark before calling EmbeddedPointerMarshall, EmbeddedPointerUnmarshall or EmbeddedPointerMemorySize. 2006-07-24 13:47:40 +02:00
Robert Shearman a8531067c4 rpcrt4: Support small fixed arrays in EmbeddedComplexSize. 2006-07-24 13:47:31 +02:00
Robert Shearman 4c4fc14fe9 rpcrt4: Allocate memory based on MaxCount, not ActualCount in NdrConformantStringUnmarshall. 2006-07-24 13:47:25 +02:00
Robert Shearman 98c26a81fe rpcrt4: Add support for marshaling the FC_HYPER base type in complex types.
Change the FIXME messages to print out unrecognised format characters in 
hex rather than decimal.
2006-07-24 13:47:13 +02:00
Robert Shearman 9318cb0fbc rpcrt4: Handle more structure padding values. 2006-07-18 11:12:47 +02:00
Robert Shearman 2cb3b22c26 rpcrt4: Fix Variance Callback Functions.
A callback function for computing the variance puts the computed value 
into the same field as a conformance, so make sure to copy the value 
into pCount before returning from ComputeConformanceOrVariance.
2006-07-14 12:38:53 +02:00
Michael Stefaniuc 00e779370f janitorial: Put "inline static" at the beginning of a declaration. 2006-07-07 14:30:35 +02:00
Huw Davies 85ed9a5905 rpcrt4: Don't advance the buffer for FC_STRUCTPAD2. 2006-07-05 11:44:19 +02:00
Robert Shearman 35982d72f5 rpcrt4: Initialise pStubMsg->MemorySize to zero before calling
ComplexStructMemorySize from NdrComplexArrayUnmarshall.
2006-06-12 13:21:46 +02:00
Robert Shearman 539b48bff4 rpcrt4: Use safe_mutiply in conformant array functions. 2006-06-12 13:21:46 +02:00
Robert Shearman 8dea3c2aa8 rpcrt4: Pass in a maximum variance value to ReadVariance to allow us
to validate the conformance values being read from the wire.
2006-06-12 13:21:46 +02:00
Robert Shearman 613ee6d01c rpcrt4: Check that strings are null-terminated on unmarshaling of conformant-varying structs. 2006-06-12 13:21:46 +02:00
Robert Shearman a946eb420b rpcrt4: Use safe_multiply when multiplying anything by pStubMsg->ActualCount or pStubMsg->MaxCount. 2006-06-12 13:21:46 +02:00
Robert Shearman cec6092aa2 rpcrt4: Raise an exception during unmarshaling if a conformant string isn't null-terminated. 2006-06-12 13:21:46 +02:00
Robert Shearman 6e95bfe85a rpcrt4: Introduce a new function, safe_multiply, which will raise an
exception if a multiply overflows a 4-byte integer.

This will protect the unmarshaling code against attacks specifying a 
large variance.
Use this new function in the conformant string functions to harden them 
against attack.
2006-06-12 13:20:30 +02:00
Robert Shearman d98b73a17a rpcrt4: Clear an object pointer during unmarshaling, otherwise we
could end up using the previously allocated memory even if it isn't
the right size, causing heap corruption.
2006-06-09 21:07:57 +02:00
Robert Shearman 578df90d6d rpcrt4: Initialise pStubMsg->MemorySize to zero before calling ComplexStructMemorySize from NdrComplexArrayUnmarshall. 2006-06-09 21:07:44 +02:00
Robert Shearman 21673d03f9 rpcrt4: Implement more base types for complex types. 2006-06-09 21:07:22 +02:00
Robert Shearman c9779ca16b rpcrt4: Implement varying array NDR functions. 2006-06-05 13:25:09 +02:00
Robert Shearman cd19c99284 rpcrt4: Don't call NdrBaseTypeMemorySize from within NdrBaseTypeUnmarshall. 2006-06-05 13:24:54 +02:00