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
6e8c2d83
Commit
6e8c2d83
authored
Feb 06, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Allow only ASCII digits in PSPropertyKeyFromString.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
275f6ca3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
propsys_main.c
dlls/propsys/propsys_main.c
+1
-1
propsys.c
dlls/propsys/tests/propsys.c
+4
-0
No files found.
dlls/propsys/propsys_main.c
View file @
6e8c2d83
...
...
@@ -495,7 +495,7 @@ HRESULT WINAPI PSPropertyKeyFromString(LPCWSTR pszString, PROPERTYKEY *pkey)
}
/* Overflow is not checked. */
while
(
iswdigit
(
*
pszString
)
)
while
(
'0'
<=
*
pszString
&&
*
pszString
<=
'9'
)
{
pkey
->
pid
*=
10
;
pkey
->
pid
+=
(
*
pszString
-
'0'
);
...
...
dlls/propsys/tests/propsys.c
View file @
6e8c2d83
...
...
@@ -346,6 +346,9 @@ static void test_PSPropertyKeyFromString(void)
static
const
WCHAR
fmtid_normalpidW
[]
=
{
'{'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'-'
,
'1'
,
'2'
,
'3'
,
'4'
,
'-'
,
'1'
,
'2'
,
'3'
,
'4'
,
'-'
,
'1'
,
'2'
,
'3'
,
'4'
,
'-'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'0'
,
'1'
,
'2'
,
'}'
,
' '
,
'1'
,
'3'
,
'5'
,
'7'
,
'9'
,
0
};
static
const
WCHAR
fmtid_udigitW
[]
=
{
'{'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'-'
,
'1'
,
'2'
,
'3'
,
'4'
,
'-'
,
'1'
,
'2'
,
'3'
,
'4'
,
'-'
,
'1'
,
'2'
,
'3'
,
'4'
,
'-'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'0'
,
'1'
,
'2'
,
'}'
,
' '
,
'1'
,
'2'
,
'3'
,
0x661
,
'5'
,
'7'
,
'9'
,
0
};
PROPERTYKEY
out_init
=
{
GUID_MEMBERS
(
dummy_guid
),
0xdeadbeef
};
PROPERTYKEY
out
;
HRESULT
ret
;
...
...
@@ -422,6 +425,7 @@ static void test_PSPropertyKeyFromString(void)
{
fmtid_commanegspcpidW
,
&
out
,
S_OK
,
{
GUID_MEMBERS
(
expect_guid
),
0U
}},
{
fmtid_negcommapidW
,
&
out
,
S_OK
,
{
GUID_MEMBERS
(
expect_guid
),
0
}},
{
fmtid_normalpidW
,
&
out
,
S_OK
,
{
GUID_MEMBERS
(
expect_guid
),
13579
}},
{
fmtid_udigitW
,
&
out
,
S_OK
,
{
GUID_MEMBERS
(
expect_guid
),
123
}},
};
int
i
;
...
...
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