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
c2962b22
Commit
c2962b22
authored
Feb 15, 2023
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Avoid truncating unicode chars.
So that strings containing Cyrillic Capital Letter ER (0x420) won't be quoted when not needed. Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
parent
2bfe81e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
str.c
dlls/crypt32/str.c
+7
-2
No files found.
dlls/crypt32/str.c
View file @
c2962b22
...
...
@@ -139,6 +139,11 @@ static inline BOOL is_quotable_char(WCHAR c)
}
}
static
inline
BOOL
is_spaceW
(
WCHAR
c
)
{
return
c
<=
0x7f
&&
isspace
((
char
)
c
);
}
static
DWORD
quote_rdn_value_to_str_w
(
DWORD
dwValueType
,
PCERT_RDN_VALUE_BLOB
pValue
,
LPWSTR
psz
,
DWORD
csz
)
{
...
...
@@ -195,9 +200,9 @@ static DWORD quote_rdn_value_to_str_w(DWORD dwValueType,
case
CERT_RDN_BMP_STRING
:
case
CERT_RDN_UTF8_STRING
:
strLen
=
len
=
pValue
->
cbData
/
sizeof
(
WCHAR
);
if
(
pValue
->
cbData
&&
isspace
(
pValue
->
pbData
[
0
]))
if
(
strLen
&&
is_spaceW
(((
LPCWSTR
)
pValue
->
pbData
)
[
0
]))
needsQuotes
=
TRUE
;
if
(
pValue
->
cbData
&&
isspace
(
pValue
->
pbData
[
strLen
-
1
]))
if
(
strLen
&&
_spaceW
(((
LPCWSTR
)
pValue
->
pbData
)
[
strLen
-
1
]))
needsQuotes
=
TRUE
;
for
(
i
=
0
;
i
<
strLen
;
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