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
5f85b7c8
Commit
5f85b7c8
authored
May 10, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
May 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Don't return bogus pointers if no data is available.
parent
1a00e932
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
19 deletions
+25
-19
typelib.c
dlls/oleaut32/typelib.c
+25
-19
No files found.
dlls/oleaut32/typelib.c
View file @
5f85b7c8
...
...
@@ -5330,9 +5330,12 @@ static HRESULT TLB_AllocAndInitFuncDesc( const FUNCDESC *src, FUNCDESC **dest_pt
dest
->
funckind
=
FUNC_DISPATCH
;
buffer
=
(
char
*
)(
dest
+
1
);
dest
->
lprgscode
=
(
SCODE
*
)
buffer
;
memcpy
(
dest
->
lprgscode
,
src
->
lprgscode
,
sizeof
(
*
src
->
lprgscode
)
*
src
->
cScodes
);
buffer
+=
sizeof
(
*
src
->
lprgscode
)
*
src
->
cScodes
;
if
(
dest
->
cScodes
)
{
dest
->
lprgscode
=
(
SCODE
*
)
buffer
;
memcpy
(
dest
->
lprgscode
,
src
->
lprgscode
,
sizeof
(
*
src
->
lprgscode
)
*
src
->
cScodes
);
buffer
+=
sizeof
(
*
src
->
lprgscode
)
*
src
->
cScodes
;
}
else
dest
->
lprgscode
=
NULL
;
hr
=
TLB_CopyElemDesc
(
&
src
->
elemdescFunc
,
&
dest
->
elemdescFunc
,
&
buffer
);
if
(
FAILED
(
hr
))
...
...
@@ -5341,23 +5344,26 @@ static HRESULT TLB_AllocAndInitFuncDesc( const FUNCDESC *src, FUNCDESC **dest_pt
return
hr
;
}
dest
->
lprgelemdescParam
=
(
ELEMDESC
*
)
buffer
;
buffer
+=
sizeof
(
ELEMDESC
)
*
src
->
cParams
;
for
(
i
=
0
;
i
<
src
->
cParams
;
i
++
)
{
hr
=
TLB_CopyElemDesc
(
&
src
->
lprgelemdescParam
[
i
],
&
dest
->
lprgelemdescParam
[
i
],
&
buffer
);
if
(
dest
->
cParams
)
{
dest
->
lprgelemdescParam
=
(
ELEMDESC
*
)
buffer
;
buffer
+=
sizeof
(
ELEMDESC
)
*
src
->
cParams
;
for
(
i
=
0
;
i
<
src
->
cParams
;
i
++
)
{
hr
=
TLB_CopyElemDesc
(
&
src
->
lprgelemdescParam
[
i
],
&
dest
->
lprgelemdescParam
[
i
],
&
buffer
);
if
(
FAILED
(
hr
))
break
;
}
if
(
FAILED
(
hr
))
break
;
}
if
(
FAILED
(
hr
))
{
/* undo the above actions */
for
(
i
=
i
-
1
;
i
>=
0
;
i
--
)
TLB_FreeElemDesc
(
&
dest
->
lprgelemdescParam
[
i
]);
TLB_FreeElemDesc
(
&
dest
->
elemdescFunc
);
SysFreeString
((
BSTR
)
dest
);
return
hr
;
}
{
/* undo the above actions */
for
(
i
=
i
-
1
;
i
>=
0
;
i
--
)
TLB_FreeElemDesc
(
&
dest
->
lprgelemdescParam
[
i
]);
TLB_FreeElemDesc
(
&
dest
->
elemdescFunc
);
SysFreeString
((
BSTR
)
dest
);
return
hr
;
}
}
else
dest
->
lprgelemdescParam
=
NULL
;
/* special treatment for dispinterfaces: this makes functions appear
* to return their [retval] value when it is really returning an
...
...
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