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
623abfca
Commit
623abfca
authored
Dec 22, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix null parameters handling in ICreateTypeLib2::CreateTypeInfo().
parent
c71998d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
typelib.c
dlls/oleaut32/tests/typelib.c
+10
-0
typelib2.c
dlls/oleaut32/typelib2.c
+6
-5
No files found.
dlls/oleaut32/tests/typelib.c
View file @
623abfca
...
...
@@ -1406,6 +1406,16 @@ static void test_CreateTypeLib(void) {
SysFreeString
(
name
);
SysFreeString
(
helpfile
);
/* invalid parameters */
hres
=
ICreateTypeLib_CreateTypeInfo
(
createtl
,
NULL
,
TKIND_INTERFACE
,
&
createti
);
ok
(
hres
==
E_INVALIDARG
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeLib_CreateTypeInfo
(
createtl
,
interface1W
,
TKIND_INTERFACE
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeLib_CreateTypeInfo
(
createtl
,
NULL
,
TKIND_INTERFACE
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"got %08x
\n
"
,
hres
);
hres
=
ICreateTypeLib_CreateTypeInfo
(
createtl
,
interface1W
,
TKIND_INTERFACE
,
&
createti
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
...
...
dlls/oleaut32/typelib2.c
View file @
623abfca
...
...
@@ -4389,20 +4389,21 @@ static HRESULT WINAPI ICreateTypeLib2_fnCreateTypeInfo(
ICreateTypeLib2
*
iface
,
LPOLESTR
szName
,
TYPEKIND
tkind
,
ICreateTypeInfo
**
ppCTI
nfo
)
ICreateTypeInfo
**
ti
nfo
)
{
ICreateTypeLib2Impl
*
This
=
(
ICreateTypeLib2Impl
*
)
iface
;
char
*
name
;
TRACE
(
"(%p,%s,%d,%p)
\n
"
,
iface
,
debugstr_w
(
szName
),
tkind
,
ppCTInfo
);
TRACE
(
"(%p,%s,%d,%p)
\n
"
,
iface
,
debugstr_w
(
szName
),
tkind
,
tinfo
);
if
(
!
szName
||
!
tinfo
)
return
E_INVALIDARG
;
ctl2_encode_name
(
This
,
szName
,
&
name
);
if
(
ctl2_find_name
(
This
,
name
)
!=
-
1
)
return
TYPE_E_NAMECONFLICT
;
*
ppCTInfo
=
(
ICreateTypeInfo
*
)
ICreateTypeInfo2_Constructor
(
This
,
szName
,
tkind
);
if
(
!*
ppCTInfo
)
return
E_OUTOFMEMORY
;
*
tinfo
=
(
ICreateTypeInfo
*
)
ICreateTypeInfo2_Constructor
(
This
,
szName
,
tkind
);
if
(
!*
tinfo
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
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