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
49eaa0db
Commit
49eaa0db
authored
Nov 03, 2003
by
Marcus Meissner
Committed by
Alexandre Julliard
Nov 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not coerce arguments of ITypeLib::Invoke in-place, or we get
corrupted variants. Handle V_ARRAY | something -> VT_SAFEARRAY, as this is a NOP.
parent
7e1f3803
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
typelib.c
dlls/oleaut32/typelib.c
+15
-4
No files found.
dlls/oleaut32/typelib.c
View file @
49eaa0db
...
...
@@ -4335,6 +4335,7 @@ _copy_arg( ITypeInfo2 *tinfo, TYPEDESC *tdesc,
)
{
UINT
arglen
=
_argsize
(
vt
)
*
sizeof
(
DWORD
);
VARTYPE
oldvt
;
VARIANT
va
;
if
((
vt
==
VT_PTR
)
&&
tdesc
&&
(
tdesc
->
u
.
lptdesc
->
vt
==
VT_VARIANT
))
{
memcpy
(
argpos
,
&
arg
,
sizeof
(
void
*
));
...
...
@@ -4345,7 +4346,12 @@ _copy_arg( ITypeInfo2 *tinfo, TYPEDESC *tdesc,
memcpy
(
argpos
,
&
V_UNION
(
arg
,
lVal
),
arglen
);
return
S_OK
;
}
if
(
V_ISARRAY
(
arg
)
&&
(
vt
==
VT_SAFEARRAY
))
{
memcpy
(
argpos
,
&
V_UNION
(
arg
,
parray
),
sizeof
(
SAFEARRAY
*
));
return
S_OK
;
}
if
(
vt
==
VT_VARIANT
)
{
memcpy
(
argpos
,
arg
,
arglen
);
return
S_OK
;
...
...
@@ -4362,6 +4368,7 @@ _copy_arg( ITypeInfo2 *tinfo, TYPEDESC *tdesc,
}
if
((
vt
==
VT_PTR
)
&&
tdesc
)
return
_copy_arg
(
tinfo
,
tdesc
->
u
.
lptdesc
,
argpos
,
arg
,
tdesc
->
u
.
lptdesc
->
vt
);
if
((
vt
==
VT_USERDEFINED
)
&&
tdesc
&&
tinfo
)
{
ITypeInfo
*
tinfo2
;
TYPEATTR
*
tattr
;
...
...
@@ -4432,10 +4439,14 @@ _copy_arg( ITypeInfo2 *tinfo, TYPEDESC *tdesc,
}
return
E_FAIL
;
}
oldvt
=
V_VT
(
arg
);
if
(
VariantChangeType
(
arg
,
arg
,
0
,
vt
)
==
S_OK
)
{
FIXME
(
"argument was coerced in-place (0x%x -> 0x%x); source data has been modified!!!
\n
"
,
oldvt
,
vt
);
memcpy
(
argpos
,
&
V_UNION
(
arg
,
lVal
),
arglen
);
VariantInit
(
&
va
);
if
(
VariantChangeType
(
&
va
,
arg
,
0
,
vt
)
==
S_OK
)
{
memcpy
(
argpos
,
&
V_UNION
(
&
va
,
lVal
),
arglen
);
FIXME
(
"Should not use VariantChangeType here. (conversion from 0x%x -> 0x%x)
\n
"
,
V_VT
(
arg
),
vt
);
return
S_OK
;
}
ERR
(
"Set arg to disparg type 0x%x vs 0x%x
\n
"
,
V_VT
(
arg
),
vt
);
...
...
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