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
798429f9
Commit
798429f9
authored
Nov 05, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Nov 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Validate the product code.
parent
861ae27a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
source.c
dlls/msi/source.c
+2
-1
source.c
dlls/msi/tests/source.c
+3
-12
No files found.
dlls/msi/source.c
View file @
798429f9
...
...
@@ -589,11 +589,12 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
HKEY
typekey
;
UINT
rc
;
media_info
source_struct
;
WCHAR
squished_pc
[
GUID_SIZE
];
TRACE
(
"%s %s %x %x %s %i
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
szUserSid
),
dwContext
,
dwOptions
,
debugstr_w
(
szSource
),
dwIndex
);
if
(
!
szProduct
)
if
(
!
szProduct
||
!
squash_guid
(
szProduct
,
squished_pc
)
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
szSource
)
...
...
dlls/msi/tests/source.c
View file @
798429f9
...
...
@@ -365,27 +365,18 @@ static void test_MsiSourceListAddSourceEx(void)
/* empty szProductCodeOrPatchCode */
r
=
pMsiSourceListAddSourceExA
(
""
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
"C:
\\
source"
,
0
);
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
=
pMsiSourceListAddSourceExA
(
"garbage"
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
"C:
\\
source"
,
0
);
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
=
pMsiSourceListAddSourceExA
(
"51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA"
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
"C:
\\
source"
,
0
);
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
=
pMsiSourceListAddSourceExA
(
"{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}"
,
usersid
,
...
...
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