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
30355fa6
Commit
30355fa6
authored
Oct 10, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Oct 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Don't check tag in AsnDecodeIntInternal, caller already checks it.
parent
436a4a28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
decode.c
dlls/crypt32/decode.c
+16
-10
No files found.
dlls/crypt32/decode.c
View file @
30355fa6
...
...
@@ -3118,6 +3118,7 @@ static BOOL WINAPI CRYPT_AsnDecodeBits(DWORD dwCertEncodingType,
return
ret
;
}
/* Ignores tag. Only allows integers 4 bytes or smaller in size. */
static
BOOL
CRYPT_AsnDecodeIntInternal
(
const
BYTE
*
pbEncoded
,
DWORD
cbEncoded
,
DWORD
dwFlags
,
void
*
pvStructInfo
,
DWORD
*
pcbStructInfo
,
DWORD
*
pcbDecoded
)
{
...
...
@@ -3127,14 +3128,8 @@ static BOOL CRYPT_AsnDecodeIntInternal(const BYTE *pbEncoded, DWORD cbEncoded,
DWORD
size
=
sizeof
(
buf
);
blob
->
pbData
=
buf
+
sizeof
(
CRYPT_INTEGER_BLOB
);
if
(
pbEncoded
[
0
]
!=
ASN_INTEGER
)
{
SetLastError
(
CRYPT_E_ASN1_BADTAG
);
ret
=
FALSE
;
}
else
ret
=
CRYPT_AsnDecodeIntegerInternal
(
pbEncoded
,
cbEncoded
,
0
,
&
buf
,
&
size
,
pcbDecoded
);
ret
=
CRYPT_AsnDecodeIntegerInternal
(
pbEncoded
,
cbEncoded
,
0
,
&
buf
,
&
size
,
pcbDecoded
);
if
(
ret
)
{
if
(
!
pvStructInfo
)
...
...
@@ -3173,8 +3168,19 @@ static BOOL WINAPI CRYPT_AsnDecodeInt(DWORD dwCertEncodingType,
{
DWORD
bytesNeeded
;
ret
=
CRYPT_AsnDecodeIntInternal
(
pbEncoded
,
cbEncoded
,
dwFlags
&
~
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
&
bytesNeeded
,
NULL
);
if
(
!
cbEncoded
)
{
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
}
else
if
(
pbEncoded
[
0
]
!=
ASN_INTEGER
)
{
SetLastError
(
CRYPT_E_ASN1_BADTAG
);
ret
=
FALSE
;
}
else
ret
=
CRYPT_AsnDecodeIntInternal
(
pbEncoded
,
cbEncoded
,
dwFlags
&
~
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
&
bytesNeeded
,
NULL
);
if
(
ret
)
{
if
(
!
pvStructInfo
)
...
...
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