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
273766ee
Commit
273766ee
authored
Dec 24, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Re-use existing memory for embedded pointers in NdrConformantVaryingArrayUnmarshall.
parent
a05923e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+8
-3
server.c
dlls/rpcrt4/tests/server.c
+0
-1
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
273766ee
...
...
@@ -2864,6 +2864,8 @@ unsigned char* WINAPI NdrConformantVaryingArrayUnmarshall( PMIDL_STUB_MESSAGE pS
ULONG
bufsize
,
memsize
;
unsigned
char
alignment
=
pFormat
[
1
]
+
1
;
DWORD
esize
=
*
(
const
WORD
*
)(
pFormat
+
2
);
unsigned
char
*
saved_buffer
;
ULONG
offset
;
TRACE
(
"(%p, %p, %p, %d)
\n
"
,
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
...
...
@@ -2881,13 +2883,16 @@ unsigned char* WINAPI NdrConformantVaryingArrayUnmarshall( PMIDL_STUB_MESSAGE pS
bufsize
=
safe_multiply
(
esize
,
pStubMsg
->
ActualCount
);
memsize
=
safe_multiply
(
esize
,
pStubMsg
->
MaxCount
);
offset
=
pStubMsg
->
Offset
;
if
(
!*
ppMemory
||
fMustAlloc
)
*
ppMemory
=
NdrAllocate
(
pStubMsg
,
memsize
);
pStubMsg
->
BufferMark
=
pStubMsg
->
Buffer
;
safe_
copy_from_buffer
(
pStubMsg
,
*
ppMemory
+
pStubMsg
->
Offset
,
bufsize
);
saved_buffer
=
pStubMsg
->
BufferMark
=
pStubMsg
->
Buffer
;
safe_
buffer_increment
(
pStubMsg
,
bufsize
);
EmbeddedPointerUnmarshall
(
pStubMsg
,
*
ppMemory
,
*
ppMemory
,
pFormat
,
TRUE
/* FIXME */
);
EmbeddedPointerUnmarshall
(
pStubMsg
,
saved_buffer
,
*
ppMemory
,
pFormat
,
fMustAlloc
);
memcpy
(
*
ppMemory
+
offset
,
saved_buffer
,
bufsize
);
return
NULL
;
}
...
...
dlls/rpcrt4/tests/server.c
View file @
273766ee
...
...
@@ -1143,7 +1143,6 @@ array_tests(void)
api
[
0
].
pi
=
pi
;
get_numbers
(
1
,
1
,
api
);
todo_wine
ok
(
api
[
0
].
pi
==
pi
,
"RPC conformant varying array [out] pointer changed from %p to %p
\n
"
,
pi
,
api
[
0
].
pi
);
ok
(
*
api
[
0
].
pi
==
0
,
"pi unmarshalled incorrectly %d
\n
"
,
*
pi
);
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
...
...
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