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
77cfb323
Commit
77cfb323
authored
Oct 14, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Oct 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Simplify CRYPT_AsnDecodePKCSAttributes.
parent
c7e3ea14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
decode.c
dlls/crypt32/decode.c
+8
-8
No files found.
dlls/crypt32/decode.c
View file @
77cfb323
...
...
@@ -3135,14 +3135,15 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSAttributes(DWORD dwCertEncodingType,
__TRY
{
struct
AsnArrayDescriptor
arrayDesc
=
{
ASN_CONSTRUCTOR
|
ASN_SETOF
,
CRYPT_AsnDecodePKCSAttributeInternal
,
sizeof
(
CRYPT_ATTRIBUTE
),
TRUE
,
offsetof
(
CRYPT_ATTRIBUTE
,
pszObjId
)
};
DWORD
bytesNeeded
;
if
(
pbEncoded
[
0
]
!=
(
ASN_CONSTRUCTOR
|
ASN_SETOF
))
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
else
if
((
ret
=
CRYPT_AsnDecodePKCSAttributesInternal
(
pbEncoded
,
cbEncoded
,
dwFlags
&
~
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
&
bytesNeeded
,
NULL
)))
if
((
ret
=
CRYPT_AsnDecodeArrayNoAlloc
(
&
arrayDesc
,
pbEncoded
,
cbEncoded
,
NULL
,
NULL
,
&
bytesNeeded
,
NULL
)))
{
bytesNeeded
+=
sizeof
(
CRYPT_ATTRIBUTES
);
if
(
!
pvStructInfo
)
*
pcbStructInfo
=
bytesNeeded
;
else
if
((
ret
=
CRYPT_DecodeEnsureSpace
(
dwFlags
,
pDecodePara
,
...
...
@@ -3155,9 +3156,8 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSAttributes(DWORD dwCertEncodingType,
attrs
=
pvStructInfo
;
attrs
->
rgAttr
=
(
PCRYPT_ATTRIBUTE
)((
BYTE
*
)
pvStructInfo
+
sizeof
(
CRYPT_ATTRIBUTES
));
ret
=
CRYPT_AsnDecodePKCSAttributesInternal
(
pbEncoded
,
cbEncoded
,
dwFlags
&
~
CRYPT_DECODE_ALLOC_FLAG
,
pvStructInfo
,
&
bytesNeeded
,
NULL
);
ret
=
CRYPT_AsnDecodeArrayNoAlloc
(
&
arrayDesc
,
pbEncoded
,
cbEncoded
,
&
attrs
->
cAttr
,
attrs
->
rgAttr
,
&
bytesNeeded
,
NULL
);
}
}
}
...
...
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