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
a302ec64
Commit
a302ec64
authored
Jun 05, 2008
by
Dan Kegel
Committed by
Alexandre Julliard
Jun 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Initialize buffer lengths before calling MsiSourceListEnumMediaDisks.
parent
2173fde7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
source.c
dlls/msi/tests/source.c
+18
-0
No files found.
dlls/msi/tests/source.c
View file @
a302ec64
...
...
@@ -2319,6 +2319,8 @@ static void test_MsiSourceListEnumMediaDisks(void)
/* GetLastError is not set by the function */
/* NULL szProductCodeOrPatchCode */
labelsz
=
sizeof
(
label
);
promptsz
=
sizeof
(
prompt
);
r
=
pMsiSourceListEnumMediaDisksA
(
NULL
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
0
,
&
id
,
label
,
&
labelsz
,
prompt
,
&
promptsz
);
...
...
@@ -2326,6 +2328,8 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
/* empty szProductCodeOrPatchCode */
labelsz
=
sizeof
(
label
);
promptsz
=
sizeof
(
prompt
);
r
=
pMsiSourceListEnumMediaDisksA
(
""
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
0
,
&
id
,
label
,
&
labelsz
,
prompt
,
&
promptsz
);
...
...
@@ -2333,6 +2337,8 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
/* garbage szProductCodeOrPatchCode */
labelsz
=
sizeof
(
label
);
promptsz
=
sizeof
(
prompt
);
r
=
pMsiSourceListEnumMediaDisksA
(
"garbage"
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
0
,
&
id
,
label
,
&
labelsz
,
prompt
,
&
promptsz
);
...
...
@@ -2340,6 +2346,8 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
/* guid without brackets */
labelsz
=
sizeof
(
label
);
promptsz
=
sizeof
(
prompt
);
r
=
pMsiSourceListEnumMediaDisksA
(
"51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA"
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
0
,
&
id
,
label
,
&
labelsz
,
...
...
@@ -2348,6 +2356,8 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
/* guid with brackets */
labelsz
=
sizeof
(
label
);
promptsz
=
sizeof
(
prompt
);
r
=
pMsiSourceListEnumMediaDisksA
(
"{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}"
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
0
,
&
id
,
label
,
&
labelsz
,
...
...
@@ -2356,6 +2366,8 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
/* dwOptions has MSISOURCETYPE_NETWORK */
labelsz
=
sizeof
(
label
);
promptsz
=
sizeof
(
prompt
);
r
=
pMsiSourceListEnumMediaDisksA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
0
,
&
id
,
label
,
&
labelsz
,
...
...
@@ -2364,6 +2376,8 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
/* dwOptions has MSISOURCETYPE_URL */
labelsz
=
sizeof
(
label
);
promptsz
=
sizeof
(
prompt
);
r
=
pMsiSourceListEnumMediaDisksA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
0
,
&
id
,
label
,
&
labelsz
,
...
...
@@ -2372,6 +2386,8 @@ static void test_MsiSourceListEnumMediaDisks(void)
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
/* dwIndex is non-zero */
labelsz
=
sizeof
(
label
);
promptsz
=
sizeof
(
prompt
);
r
=
pMsiSourceListEnumMediaDisksA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
1
,
&
id
,
label
,
&
labelsz
,
prompt
,
&
promptsz
);
...
...
@@ -2387,6 +2403,8 @@ static void test_MsiSourceListEnumMediaDisks(void)
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* user product key exists */
labelsz
=
sizeof
(
label
);
promptsz
=
sizeof
(
prompt
);
r
=
pMsiSourceListEnumMediaDisksA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
0
,
&
id
,
label
,
&
labelsz
,
prompt
,
&
promptsz
);
...
...
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