Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
f83d0498
Commit
f83d0498
authored
17 years ago
by
James Hawkins
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msi: Validate the szProduct parameter of MsiSourceListSetInfo.
parent
10be16f3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/msi/source.c
+2
-1
2 additions, 1 deletion
dlls/msi/source.c
dlls/msi/tests/source.c
+6
-16
6 additions, 16 deletions
dlls/msi/tests/source.c
with
8 additions
and
17 deletions
dlls/msi/source.c
+
2
−
1
View file @
f83d0498
...
...
@@ -394,13 +394,14 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
MSIINSTALLCONTEXT
dwContext
,
DWORD
dwOptions
,
LPCWSTR
szProperty
,
LPCWSTR
szValue
)
{
WCHAR
squished_pc
[
GUID_SIZE
];
HKEY
sourcekey
;
UINT
rc
;
TRACE
(
"%s %s %x %x %s %s
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
szUserSid
),
dwContext
,
dwOptions
,
debugstr_w
(
szProperty
),
debugstr_w
(
szValue
));
if
(
!
szProduct
||
lstrlenW
(
szProduct
)
>
39
)
if
(
!
szProduct
||
!
squash_guid
(
szProduct
,
squished_pc
)
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
szProperty
)
...
...
This diff is collapsed.
Click to expand it.
dlls/msi/tests/source.c
+
6
−
16
View file @
f83d0498
...
...
@@ -1398,7 +1398,6 @@ static void test_MsiSourceListSetInfo(void)
LONG
res
;
UINT
r
;
create_test_guid
(
prodcode
,
prod_squashed
);
get_user_sid
(
&
usersid
);
...
...
@@ -1415,33 +1414,24 @@ static void test_MsiSourceListSetInfo(void)
r
=
MsiSourceListSetInfoA
(
""
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
,
"path"
);
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
);
/* garbage szProductCodeOrPatchCode */
r
=
MsiSourceListSetInfoA
(
"garbage"
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
,
"path"
);
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
);
/* guid without brackets */
r
=
MsiSourceListSetInfoA
(
"51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA"
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
,
"path"
);
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
);
/* guid with brackets */
r
=
MsiSourceListSetInfoA
(
"{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment