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
25e8f278
Commit
25e8f278
authored
Nov 09, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Nov 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Disallow embedded NULLs in alternate names.
parent
ddf78bdb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
decode.c
dlls/crypt32/decode.c
+7
-1
encode.c
dlls/crypt32/tests/encode.c
+0
-2
No files found.
dlls/crypt32/decode.c
View file @
25e8f278
...
...
@@ -2990,7 +2990,13 @@ static BOOL CRYPT_AsnDecodeAltNameEntry(const BYTE *pbEncoded, DWORD cbEncoded,
case
1
:
/* rfc822Name */
case
2
:
/* dNSName */
case
6
:
/* uniformResourceIdentifier */
bytesNeeded
+=
(
dataLen
+
1
)
*
sizeof
(
WCHAR
);
if
(
memchr
(
pbEncoded
+
1
+
lenBytes
,
0
,
dataLen
))
{
SetLastError
(
CRYPT_E_ASN1_RULE
);
ret
=
FALSE
;
}
else
bytesNeeded
+=
(
dataLen
+
1
)
*
sizeof
(
WCHAR
);
break
;
case
4
:
/* directoryName */
case
7
:
/* iPAddress */
...
...
dlls/crypt32/tests/encode.c
View file @
25e8f278
...
...
@@ -1691,7 +1691,6 @@ static void test_decodeAltName(DWORD dwEncoding)
/* Fails on WinXP with CRYPT_E_ASN1_RULE. I'm not too concerned about the
* particular failure, just that it doesn't decode.
*/
todo_wine
ok
(
!
ret
,
"expected failure
\n
"
);
/* An embedded bell character is allowed, however. */
ret
=
pCryptDecodeObjectEx
(
dwEncoding
,
X509_ALTERNATE_NAME
,
...
...
@@ -1715,7 +1714,6 @@ static void test_decodeAltName(DWORD dwEncoding)
/* Again, fails on WinXP with CRYPT_E_ASN1_RULE. I'm not too concerned
* about the particular failure, just that it doesn't decode.
*/
todo_wine
ok
(
!
ret
,
"expected failure
\n
"
);
}
...
...
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