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
c735a147
Commit
c735a147
authored
Nov 29, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Nov 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Fix NdrSimpleStructUnmarshall to cope with [in, out] embedded pointers.
parent
b676309d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+13
-13
server.c
dlls/rpcrt4/tests/server.c
+0
-1
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
c735a147
...
...
@@ -1715,28 +1715,28 @@ unsigned char * WINAPI NdrSimpleStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
char
fMustAlloc
)
{
unsigned
size
=
*
(
const
WORD
*
)(
pFormat
+
2
);
unsigned
char
*
saved_buffer
;
TRACE
(
"(%p,%p,%p,%d)
\n
"
,
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
pFormat
[
1
]
+
1
);
pStubMsg
->
BufferMark
=
pStubMsg
->
Buffer
;
if
(
fMustAlloc
)
{
if
(
fMustAlloc
)
*
ppMemory
=
NdrAllocate
(
pStubMsg
,
size
);
safe_copy_from_buffer
(
pStubMsg
,
*
ppMemory
,
size
);
}
else
{
if
(
!
pStubMsg
->
IsClient
&&
!*
ppMemory
)
{
else
{
if
(
!
pStubMsg
->
IsClient
&&
!*
ppMemory
)
/* for servers, we just point straight into the RPC buffer */
*
ppMemory
=
pStubMsg
->
Buffer
;
safe_buffer_increment
(
pStubMsg
,
size
);
}
else
/* for clients, memory should be provided by caller */
safe_copy_from_buffer
(
pStubMsg
,
*
ppMemory
,
size
);
}
if
(
pFormat
[
0
]
!=
RPC_FC_STRUCT
)
EmbeddedPointerUnmarshall
(
pStubMsg
,
*
ppMemory
,
*
ppMemory
,
pFormat
+
4
,
TRUE
/* FIXME */
);
saved_buffer
=
pStubMsg
->
BufferMark
=
pStubMsg
->
Buffer
;
safe_buffer_increment
(
pStubMsg
,
size
);
if
(
pFormat
[
0
]
==
RPC_FC_PSTRUCT
)
EmbeddedPointerUnmarshall
(
pStubMsg
,
saved_buffer
,
*
ppMemory
,
pFormat
+
4
,
fMustAlloc
);
TRACE
(
"copying %p to %p
\n
"
,
saved_buffer
,
*
ppMemory
);
if
(
*
ppMemory
!=
saved_buffer
)
memcpy
(
*
ppMemory
,
saved_buffer
,
size
);
return
NULL
;
}
...
...
dlls/rpcrt4/tests/server.c
View file @
c735a147
...
...
@@ -876,7 +876,6 @@ pointer_tests(void)
name
.
size
=
10
;
name
.
name
=
buffer
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
name
.
size
);
get_name
(
&
name
);
todo_wine
ok
(
name
.
name
==
buffer
,
"[in,out] pointer should have stayed as %p but instead changed to %p
\n
"
,
name
.
name
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
name
.
name
);
...
...
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