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
9598a509
Commit
9598a509
authored
Jan 24, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix NULL dereference in MsiQueryComponentStateW (Coverity).
parent
f34e733c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
msi.c
dlls/msi/msi.c
+1
-1
msi.c
dlls/msi/tests/msi.c
+6
-0
No files found.
dlls/msi/msi.c
View file @
9598a509
...
...
@@ -1553,7 +1553,7 @@ UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode,
TRACE
(
"(%s, %s, %d, %s, %p)
\n
"
,
debugstr_w
(
szProductCode
),
debugstr_w
(
szUserSid
),
dwContext
,
debugstr_w
(
szComponent
),
pdwState
);
if
(
!
pdwState
)
if
(
!
pdwState
||
!
szComponent
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
szProductCode
||
!*
szProductCode
||
lstrlenW
(
szProductCode
)
!=
GUID_SIZE
-
1
)
...
...
dlls/msi/tests/msi.c
View file @
9598a509
...
...
@@ -1278,6 +1278,12 @@ static void test_MsiQueryComponentState(void)
ok
(
state
==
INSTALLSTATE_NOTUSED
||
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_NOTUSED or INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
/* NULL component, product exists */
state
=
MAGIC_ERROR
;
r
=
pMsiQueryComponentStateA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_MACHINE
,
NULL
,
&
state
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
ok
(
state
==
MAGIC_ERROR
,
"Expected state not changed, got %d
\n
"
,
state
);
res
=
RegSetValueExA
(
compkey
,
prod_squashed
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"hi"
,
2
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
...
...
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