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
a92fe55c
Commit
a92fe55c
authored
Apr 17, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix some possible NULL pointer dereferences (Coverity).
parent
13dccd75
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
0 deletions
+25
-0
msi.c
dlls/msi/msi.c
+3
-0
package.c
dlls/msi/package.c
+3
-0
registry.c
dlls/msi/registry.c
+3
-0
msi.c
dlls/msi/tests/msi.c
+16
-0
No files found.
dlls/msi/msi.c
View file @
a92fe55c
...
...
@@ -667,6 +667,9 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
TRACE
(
"%s
\n
"
,
debugstr_w
(
szProduct
));
if
(
!
szProduct
)
return
INSTALLSTATE_INVALIDARG
;
rc
=
MSIREG_OpenUserProductsKey
(
szProduct
,
&
hkey
,
FALSE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
...
...
dlls/msi/package.c
View file @
a92fe55c
...
...
@@ -514,6 +514,9 @@ UINT WINAPI MsiOpenPackageExW(LPCWSTR szPackage, DWORD dwOptions, MSIHANDLE *phP
TRACE
(
"%s %08lx %p
\n
"
,
debugstr_w
(
szPackage
),
dwOptions
,
phPackage
);
if
(
szPackage
==
NULL
)
return
ERROR_INVALID_PARAMETER
;
if
(
dwOptions
)
FIXME
(
"dwOptions %08lx not supported
\n
"
,
dwOptions
);
...
...
dlls/msi/registry.c
View file @
a92fe55c
...
...
@@ -675,6 +675,9 @@ UINT WINAPI MsiEnumFeaturesW(LPCWSTR szProduct, DWORD index,
TRACE
(
"%s %ld %p %p
\n
"
,
debugstr_w
(
szProduct
),
index
,
szFeature
,
szParent
);
if
(
!
szProduct
)
return
ERROR_INVALID_PARAMETER
;
r
=
MSIREG_OpenFeaturesKey
(
szProduct
,
&
hkeyProduct
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_NO_MORE_ITEMS
;
...
...
dlls/msi/tests/msi.c
View file @
a92fe55c
...
...
@@ -66,6 +66,21 @@ static void test_usefeature(void)
}
static
void
test_null
(
void
)
{
MSIHANDLE
hpkg
;
UINT
r
;
r
=
MsiOpenPackageExW
(
NULL
,
0
,
&
hpkg
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"wrong error"
);
r
=
MsiQueryProductStateW
(
NULL
);
ok
(
r
==
INSTALLSTATE_INVALIDARG
,
"wrong return
\n
"
);
r
=
MsiEnumFeaturesW
(
NULL
,
0
,
NULL
,
NULL
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"wrong error"
);
}
START_TEST
(
msi
)
{
HMODULE
hmod
=
GetModuleHandle
(
"msi.dll"
);
...
...
@@ -73,4 +88,5 @@ START_TEST(msi)
GetProcAddress
(
hmod
,
"MsiUseFeatureExA"
);
test_usefeature
();
test_null
();
}
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