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
4a315cd7
Commit
4a315cd7
authored
Nov 26, 2015
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Grow the marshalling buffer exponentially.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a58c4df5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tmarshal.c
dlls/oleaut32/tmarshal.c
+3
-1
No files found.
dlls/oleaut32/tmarshal.c
View file @
4a315cd7
...
...
@@ -79,12 +79,14 @@ xbuf_resize(marshal_state *buf, DWORD newsize)
if
(
buf
->
base
)
{
newsize
=
max
(
newsize
,
buf
->
size
*
2
);
buf
->
base
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
buf
->
base
,
newsize
);
if
(
!
buf
->
base
)
return
E_OUTOFMEMORY
;
}
else
{
newsize
=
max
(
newsize
,
256
);
buf
->
base
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
newsize
);
if
(
!
buf
->
base
)
return
E_OUTOFMEMORY
;
...
...
@@ -100,7 +102,7 @@ xbuf_add(marshal_state *buf, const BYTE *stuff, DWORD size)
if
(
buf
->
size
-
buf
->
curoff
<
size
)
{
hr
=
xbuf_resize
(
buf
,
buf
->
size
+
size
+
100
);
hr
=
xbuf_resize
(
buf
,
buf
->
size
+
size
);
if
(
FAILED
(
hr
))
return
hr
;
}
memcpy
(
buf
->
base
+
buf
->
curoff
,
stuff
,
size
);
...
...
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