Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c27db4cd
Commit
c27db4cd
authored
May 15, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Remove the BUFFER_PARANOIA overestimates for string memory sizes.
parent
4c0b0e00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+3
-5
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
c27db4cd
...
...
@@ -43,8 +43,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
#define BUFFER_PARANOIA 20
#if defined(__i386__)
# define LITTLE_ENDIAN_UINT32_WRITE(pchar, uint32) \
(*((UINT32 *)(pchar)) = (uint32))
...
...
@@ -581,12 +579,12 @@ void WINAPI NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
if
(
*
pFormat
==
RPC_FC_C_CSTRING
)
{
/* we need + 1 octet for '\0' */
TRACE
(
"string=%s
\n
"
,
debugstr_a
((
char
*
)
pMemory
));
pStubMsg
->
BufferLength
+=
strlen
((
char
*
)
pMemory
)
+
1
+
BUFFER_PARANOIA
;
pStubMsg
->
BufferLength
+=
strlen
((
char
*
)
pMemory
)
+
1
;
}
else
if
(
*
pFormat
==
RPC_FC_C_WSTRING
)
{
/* we need + 2 octets for L'\0' */
TRACE
(
"string=%s
\n
"
,
debugstr_w
((
LPWSTR
)
pMemory
));
pStubMsg
->
BufferLength
+=
strlenW
((
LPWSTR
)
pMemory
)
*
2
+
2
+
BUFFER_PARANOIA
;
pStubMsg
->
BufferLength
+=
strlenW
((
LPWSTR
)
pMemory
)
*
2
+
2
;
}
else
{
ERR
(
"Unhandled string type: %#x
\n
"
,
*
pFormat
);
...
...
@@ -652,7 +650,7 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
len
=
pStubMsg
->
ActualCount
;
if
(
fMustAlloc
||
!*
ppMemory
)
*
ppMemory
=
NdrAllocate
(
pStubMsg
,
len
*
esize
+
BUFFER_PARANOIA
);
*
ppMemory
=
NdrAllocate
(
pStubMsg
,
len
*
esize
);
memcpy
(
*
ppMemory
,
pStubMsg
->
Buffer
,
len
*
esize
);
...
...
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