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
ff0dc44f
Commit
ff0dc44f
authored
Feb 11, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Return ERROR_INVALID_PARAMETER if szProduct is invalid.
parent
33c1e6ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
16 deletions
+11
-16
msi.c
dlls/msi/msi.c
+5
-1
msi.c
dlls/msi/tests/msi.c
+6
-15
No files found.
dlls/msi/msi.c
View file @
ff0dc44f
...
...
@@ -567,6 +567,7 @@ static UINT WINAPI MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
UINT
r
;
HKEY
hkey
;
LPWSTR
val
=
NULL
;
WCHAR
squished_pc
[
GUID_SIZE
];
TRACE
(
"%s %s %p %p
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
szAttribute
),
szValue
,
pcchValueBuf
);
...
...
@@ -575,7 +576,10 @@ static UINT WINAPI MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
* FIXME: Values seem scattered/duplicated in the registry. Is there a system?
*/
if
((
szValue
->
str
.
w
&&
!
pcchValueBuf
)
||
!
szProduct
||
!
szProduct
[
0
]
||
!
szAttribute
)
if
((
szValue
->
str
.
w
&&
!
pcchValueBuf
)
||
!
szProduct
||
!
szAttribute
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
squash_guid
(
szProduct
,
squished_pc
))
return
ERROR_INVALID_PARAMETER
;
/* check for special properties */
...
...
dlls/msi/tests/msi.c
View file @
ff0dc44f
...
...
@@ -2080,11 +2080,8 @@ static void test_MsiGetProductInfo(void)
sz
=
MAX_PATH
;
lstrcpyA
(
buf
,
"apple"
);
r
=
MsiGetProductInfoA
(
"garbage"
,
INSTALLPROPERTY_HELPLINK
,
buf
,
&
sz
);
todo_wine
{
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
buf
,
"apple"
),
"Expected buf to be unchanged, got %s
\n
"
,
buf
);
ok
(
sz
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
sz
);
...
...
@@ -2093,11 +2090,8 @@ static void test_MsiGetProductInfo(void)
lstrcpyA
(
buf
,
"apple"
);
r
=
MsiGetProductInfoA
(
"6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D"
,
INSTALLPROPERTY_HELPLINK
,
buf
,
&
sz
);
todo_wine
{
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
buf
,
"apple"
),
"Expected buf to be unchanged, got %s
\n
"
,
buf
);
ok
(
sz
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
sz
);
...
...
@@ -2116,11 +2110,8 @@ static void test_MsiGetProductInfo(void)
lstrcpyA
(
buf
,
"apple"
);
r
=
MsiGetProductInfoA
(
"A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93"
,
INSTALLPROPERTY_HELPLINK
,
buf
,
&
sz
);
todo_wine
{
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
buf
,
"apple"
),
"Expected buf to be unchanged, got %s
\n
"
,
buf
);
ok
(
sz
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
sz
);
...
...
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