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
489b73dd
Commit
489b73dd
authored
Nov 25, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Nov 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix size of memory allocated for byrefs in VARIANT_UserMarshal.
parent
6ed98b16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
usrmarshal.c
dlls/oleaut32/usrmarshal.c
+17
-2
No files found.
dlls/oleaut32/usrmarshal.c
View file @
489b73dd
...
...
@@ -552,14 +552,29 @@ unsigned char * WINAPI VARIANT_UserUnmarshal(ULONG *pFlags, unsigned char *Buffe
if
(
header
->
vt
&
VT_BYREF
)
{
ULONG
mem_size
;
Pos
+=
4
;
switch
(
header
->
vt
&
~
VT_BYREF
)
{
/* these types have a different memory size compared to wire size */
case
VT_UNKNOWN
:
case
VT_DISPATCH
:
case
VT_BSTR
:
mem_size
=
sizeof
(
void
*
);
break
;
default:
mem_size
=
type_size
;
break
;
}
if
(
V_VT
(
pvar
)
!=
header
->
vt
)
{
VariantClear
(
pvar
);
V_BYREF
(
pvar
)
=
CoTaskMemAlloc
(
type
_size
);
V_BYREF
(
pvar
)
=
CoTaskMemAlloc
(
mem
_size
);
}
else
if
(
!
V_BYREF
(
pvar
))
V_BYREF
(
pvar
)
=
CoTaskMemAlloc
(
type
_size
);
V_BYREF
(
pvar
)
=
CoTaskMemAlloc
(
mem
_size
);
memcpy
(
V_BYREF
(
pvar
),
Pos
,
type_size
);
if
((
header
->
vt
&
VT_TYPEMASK
)
!=
VT_VARIANT
)
Pos
+=
type_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