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
e92f6655
Commit
e92f6655
authored
Jun 26, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jun 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Validate MsiQueryProductCode parameters.
parent
db318ec9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
msi.c
dlls/msi/msi.c
+6
-3
msi.c
dlls/msi/tests/msi.c
+3
-12
No files found.
dlls/msi/msi.c
View file @
e92f6655
...
@@ -764,13 +764,16 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
...
@@ -764,13 +764,16 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
UINT
rc
;
UINT
rc
;
INSTALLSTATE
rrc
=
INSTALLSTATE_UNKNOWN
;
INSTALLSTATE
rrc
=
INSTALLSTATE_UNKNOWN
;
HKEY
hkey
=
0
;
HKEY
hkey
=
0
;
static
const
WCHAR
szWindowsInstaller
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
DWORD
sz
;
DWORD
sz
;
static
const
int
GUID_LEN
=
38
;
static
const
WCHAR
szWindowsInstaller
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
TRACE
(
"%s
\n
"
,
debugstr_w
(
szProduct
));
TRACE
(
"%s
\n
"
,
debugstr_w
(
szProduct
));
if
(
!
szProduct
)
if
(
!
szProduct
||
!*
szProduct
||
lstrlenW
(
szProduct
)
!=
GUID_LEN
)
return
INSTALLSTATE_INVALIDARG
;
return
INSTALLSTATE_INVALIDARG
;
rc
=
MSIREG_OpenUserProductsKey
(
szProduct
,
&
hkey
,
FALSE
);
rc
=
MSIREG_OpenUserProductsKey
(
szProduct
,
&
hkey
,
FALSE
);
...
...
dlls/msi/tests/msi.c
View file @
e92f6655
...
@@ -347,24 +347,15 @@ static void test_MsiQueryProductState(void)
...
@@ -347,24 +347,15 @@ static void test_MsiQueryProductState(void)
/* empty prodcode */
/* empty prodcode */
state
=
MsiQueryProductStateA
(
""
);
state
=
MsiQueryProductStateA
(
""
);
todo_wine
ok
(
state
==
INSTALLSTATE_INVALIDARG
,
"Expected INSTALLSTATE_INVALIDARG, got %d
\n
"
,
state
);
{
ok
(
state
==
INSTALLSTATE_INVALIDARG
,
"Expected INSTALLSTATE_INVALIDARG, got %d
\n
"
,
state
);
}
/* garbage prodcode */
/* garbage prodcode */
state
=
MsiQueryProductStateA
(
"garbage"
);
state
=
MsiQueryProductStateA
(
"garbage"
);
todo_wine
ok
(
state
==
INSTALLSTATE_INVALIDARG
,
"Expected INSTALLSTATE_INVALIDARG, got %d
\n
"
,
state
);
{
ok
(
state
==
INSTALLSTATE_INVALIDARG
,
"Expected INSTALLSTATE_INVALIDARG, got %d
\n
"
,
state
);
}
/* guid without brackets */
/* guid without brackets */
state
=
MsiQueryProductStateA
(
"6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D"
);
state
=
MsiQueryProductStateA
(
"6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D"
);
todo_wine
ok
(
state
==
INSTALLSTATE_INVALIDARG
,
"Expected INSTALLSTATE_INVALIDARG, got %d
\n
"
,
state
);
{
ok
(
state
==
INSTALLSTATE_INVALIDARG
,
"Expected INSTALLSTATE_INVALIDARG, got %d
\n
"
,
state
);
}
/* guid with brackets */
/* guid with brackets */
state
=
MsiQueryProductStateA
(
"{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}"
);
state
=
MsiQueryProductStateA
(
"{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}"
);
...
...
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