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
a35d2b17
Commit
a35d2b17
authored
Aug 07, 2023
by
Torge Matthies
Committed by
Alexandre Julliard
Aug 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Fix segfault in CRYPT_AsnEncodeAttributeTypeValue.
Signed-off-by:
Torge Matthies
<
openglfreak@googlemail.com
>
parent
2f2fbefb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
asn.c
dlls/wintrust/asn.c
+1
-1
asn.c
dlls/wintrust/tests/asn.c
+0
-8
No files found.
dlls/wintrust/asn.c
View file @
a35d2b17
...
...
@@ -681,7 +681,7 @@ static BOOL WINAPI CRYPT_AsnEncodeAttributeTypeValue(DWORD dwCertEncodingType,
{
const
CRYPT_ATTRIBUTE_TYPE_VALUE
*
typeValue
=
pvStructInfo
;
struct
AsnEncodeSequenceItem
items
[]
=
{
{
&
typeValue
->
pszObjId
,
CRYPT_AsnEncodeOid
,
0
},
{
typeValue
->
pszObjId
,
CRYPT_AsnEncodeOid
,
0
},
{
&
typeValue
->
Value
,
CRYPT_CopyEncodedBlob
,
0
},
};
...
...
dlls/wintrust/tests/asn.c
View file @
a35d2b17
...
...
@@ -575,11 +575,9 @@ static void test_encodeSPCIndirectDataContent(void)
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
SPC_INDIRECT_DATA_CONTENT_STRUCT
,
&
indirectData
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
if
(
ret
)
{
todo_wine
ok
(
size
==
sizeof
(
emptyIndirectData
),
"Unexpected size %ld
\n
"
,
size
);
if
(
size
==
sizeof
(
emptyIndirectData
))
todo_wine
...
...
@@ -592,11 +590,9 @@ static void test_encodeSPCIndirectDataContent(void)
indirectData
.
Digest
.
pbData
=
fakeDigest
;
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
SPC_INDIRECT_DATA_CONTENT_STRUCT
,
&
indirectData
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
if
(
ret
)
{
todo_wine
ok
(
size
==
sizeof
(
spcidcWithOnlyDigest
),
"Unexpected size %ld
\n
"
,
size
);
if
(
size
==
sizeof
(
spcidcWithOnlyDigest
))
todo_wine
...
...
@@ -608,7 +604,6 @@ static void test_encodeSPCIndirectDataContent(void)
indirectData
.
DigestAlgorithm
.
pszObjId
=
szOID_OIWSEC_sha1_
;
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
SPC_INDIRECT_DATA_CONTENT_STRUCT
,
&
indirectData
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -626,7 +621,6 @@ static void test_encodeSPCIndirectDataContent(void)
indirectData
.
DigestAlgorithm
.
Parameters
.
pbData
=
parameters
;
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
SPC_INDIRECT_DATA_CONTENT_STRUCT
,
&
indirectData
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -643,7 +637,6 @@ static void test_encodeSPCIndirectDataContent(void)
indirectData
.
Data
.
pszObjId
=
SPC_PE_IMAGE_DATA_OBJID_
;
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
SPC_INDIRECT_DATA_CONTENT_STRUCT
,
&
indirectData
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -661,7 +654,6 @@ static void test_encodeSPCIndirectDataContent(void)
indirectData
.
Data
.
Value
.
pbData
=
(
void
*
)
emptySequence
;
ret
=
pCryptEncodeObjectEx
(
X509_ASN_ENCODING
,
SPC_INDIRECT_DATA_CONTENT_STRUCT
,
&
indirectData
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptEncodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
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