Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b43e7994
Commit
b43e7994
authored
May 01, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Dereference the pointer if necessary only after doing the
pointer checks and writing the pointer ID to the wire.
parent
a4f5296e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+22
-17
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
b43e7994
...
@@ -709,10 +709,6 @@ void WINAPI PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -709,10 +709,6 @@ void WINAPI PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
pFormat
+=
2
;
pFormat
+=
2
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
if
(
attr
&
RPC_FC_P_DEREF
)
{
Pointer
=
*
(
unsigned
char
**
)
Pointer
;
TRACE
(
"deref => %p
\n
"
,
Pointer
);
}
switch
(
type
)
{
switch
(
type
)
{
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
...
@@ -736,6 +732,10 @@ void WINAPI PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -736,6 +732,10 @@ void WINAPI PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
TRACE
(
"calling marshaller for type 0x%x
\n
"
,
(
int
)
*
desc
);
TRACE
(
"calling marshaller for type 0x%x
\n
"
,
(
int
)
*
desc
);
if
(
Pointer
)
{
if
(
Pointer
)
{
if
(
attr
&
RPC_FC_P_DEREF
)
{
Pointer
=
*
(
unsigned
char
**
)
Pointer
;
TRACE
(
"deref => %p
\n
"
,
Pointer
);
}
m
=
NdrMarshaller
[
*
desc
&
NDR_TABLE_MASK
];
m
=
NdrMarshaller
[
*
desc
&
NDR_TABLE_MASK
];
if
(
m
)
m
(
pStubMsg
,
Pointer
,
desc
);
if
(
m
)
m
(
pStubMsg
,
Pointer
,
desc
);
else
FIXME
(
"no marshaller for data type=%02x
\n
"
,
*
desc
);
else
FIXME
(
"no marshaller for data type=%02x
\n
"
,
*
desc
);
...
@@ -763,10 +763,6 @@ void WINAPI PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -763,10 +763,6 @@ void WINAPI PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
pFormat
+=
2
;
pFormat
+=
2
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
if
(
attr
&
RPC_FC_P_DEREF
)
{
pPointer
=
*
(
unsigned
char
***
)
pPointer
;
TRACE
(
"deref => %p
\n
"
,
pPointer
);
}
switch
(
type
)
{
switch
(
type
)
{
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
...
@@ -789,6 +785,12 @@ void WINAPI PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -789,6 +785,12 @@ void WINAPI PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
}
}
if
(
pointer_id
)
{
if
(
pointer_id
)
{
if
(
attr
&
RPC_FC_P_DEREF
)
{
if
(
!*
pPointer
||
fMustAlloc
)
*
pPointer
=
NdrAllocate
(
pStubMsg
,
sizeof
(
void
*
));
pPointer
=
*
(
unsigned
char
***
)
pPointer
;
TRACE
(
"deref => %p
\n
"
,
pPointer
);
}
m
=
NdrUnmarshaller
[
*
desc
&
NDR_TABLE_MASK
];
m
=
NdrUnmarshaller
[
*
desc
&
NDR_TABLE_MASK
];
if
(
m
)
m
(
pStubMsg
,
pPointer
,
desc
,
fMustAlloc
);
if
(
m
)
m
(
pStubMsg
,
pPointer
,
desc
,
fMustAlloc
);
else
FIXME
(
"no unmarshaller for data type=%02x
\n
"
,
*
desc
);
else
FIXME
(
"no unmarshaller for data type=%02x
\n
"
,
*
desc
);
...
@@ -813,10 +815,6 @@ void WINAPI PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -813,10 +815,6 @@ void WINAPI PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
pFormat
+=
2
;
pFormat
+=
2
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
if
(
attr
&
RPC_FC_P_DEREF
)
{
Pointer
=
*
(
unsigned
char
**
)
Pointer
;
TRACE
(
"deref => %p
\n
"
,
Pointer
);
}
switch
(
type
)
{
switch
(
type
)
{
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
...
@@ -834,6 +832,11 @@ void WINAPI PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -834,6 +832,11 @@ void WINAPI PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
RpcRaiseException
(
RPC_X_BAD_STUB_DATA
);
RpcRaiseException
(
RPC_X_BAD_STUB_DATA
);
}
}
if
(
attr
&
RPC_FC_P_DEREF
)
{
Pointer
=
*
(
unsigned
char
**
)
Pointer
;
TRACE
(
"deref => %p
\n
"
,
Pointer
);
}
m
=
NdrBufferSizer
[
*
desc
&
NDR_TABLE_MASK
];
m
=
NdrBufferSizer
[
*
desc
&
NDR_TABLE_MASK
];
if
(
m
)
m
(
pStubMsg
,
Pointer
,
desc
);
if
(
m
)
m
(
pStubMsg
,
Pointer
,
desc
);
else
FIXME
(
"no buffersizer for data type=%02x
\n
"
,
*
desc
);
else
FIXME
(
"no buffersizer for data type=%02x
\n
"
,
*
desc
);
...
@@ -855,9 +858,6 @@ unsigned long WINAPI PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -855,9 +858,6 @@ unsigned long WINAPI PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
pFormat
+=
2
;
pFormat
+=
2
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
if
(
attr
&
RPC_FC_P_DEREF
)
{
TRACE
(
"deref
\n
"
);
}
switch
(
type
)
{
switch
(
type
)
{
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
...
@@ -867,6 +867,10 @@ unsigned long WINAPI PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -867,6 +867,10 @@ unsigned long WINAPI PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
RpcRaiseException
(
RPC_X_BAD_STUB_DATA
);
RpcRaiseException
(
RPC_X_BAD_STUB_DATA
);
}
}
if
(
attr
&
RPC_FC_P_DEREF
)
{
TRACE
(
"deref
\n
"
);
}
m
=
NdrMemorySizer
[
*
desc
&
NDR_TABLE_MASK
];
m
=
NdrMemorySizer
[
*
desc
&
NDR_TABLE_MASK
];
if
(
m
)
m
(
pStubMsg
,
desc
);
if
(
m
)
m
(
pStubMsg
,
desc
);
else
FIXME
(
"no memorysizer for data type=%02x
\n
"
,
*
desc
);
else
FIXME
(
"no memorysizer for data type=%02x
\n
"
,
*
desc
);
...
@@ -891,13 +895,14 @@ void WINAPI PointerFree(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -891,13 +895,14 @@ void WINAPI PointerFree(PMIDL_STUB_MESSAGE pStubMsg,
pFormat
+=
2
;
pFormat
+=
2
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
else
desc
=
pFormat
+
*
(
const
SHORT
*
)
pFormat
;
if
(
!
Pointer
)
return
;
if
(
attr
&
RPC_FC_P_DEREF
)
{
if
(
attr
&
RPC_FC_P_DEREF
)
{
Pointer
=
*
(
unsigned
char
**
)
Pointer
;
Pointer
=
*
(
unsigned
char
**
)
Pointer
;
TRACE
(
"deref => %p
\n
"
,
Pointer
);
TRACE
(
"deref => %p
\n
"
,
Pointer
);
}
}
if
(
!
Pointer
)
return
;
m
=
NdrFreer
[
*
desc
&
NDR_TABLE_MASK
];
m
=
NdrFreer
[
*
desc
&
NDR_TABLE_MASK
];
if
(
m
)
m
(
pStubMsg
,
Pointer
,
desc
);
if
(
m
)
m
(
pStubMsg
,
Pointer
,
desc
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment