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
43e6b48b
Commit
43e6b48b
authored
Sep 17, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Use correct encoded length when decoding a sequence.
parent
f534a67b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
decode.c
dlls/crypt32/decode.c
+5
-7
No files found.
dlls/crypt32/decode.c
View file @
43e6b48b
...
...
@@ -454,7 +454,7 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
cbEncoded
-=
1
+
lenBytes
;
if
(
dataLen
==
CMSG_INDEFINITE_LENGTH
)
cbEncoded
=
dataLen
;
dataLen
=
cbEncoded
;
else
if
(
cbEncoded
<
dataLen
)
{
TRACE
(
"dataLen %d exceeds cbEncoded %d, failing
\n
"
,
dataLen
,
...
...
@@ -462,12 +462,10 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
}
else
cbEncoded
=
dataLen
;
if
(
ret
)
{
ret
=
CRYPT_AsnDecodeSequenceItems
(
items
,
cItem
,
ptr
,
cbEncoded
,
dwFlags
,
NULL
,
NULL
,
&
cbDecoded
);
ptr
,
dataLen
,
dwFlags
,
NULL
,
NULL
,
&
cbDecoded
);
if
(
ret
&&
dataLen
==
CMSG_INDEFINITE_LENGTH
)
{
if
(
cbDecoded
>
cbEncoded
-
2
)
...
...
@@ -487,9 +485,9 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
cbDecoded
+=
2
;
}
}
if
(
ret
&&
cbDecoded
!=
cbEncoded
)
if
(
ret
&&
cbDecoded
!=
dataLen
)
{
TRACE
(
"expected %d decoded, got %d, failing
\n
"
,
cbEncoded
,
TRACE
(
"expected %d decoded, got %d, failing
\n
"
,
dataLen
,
cbDecoded
);
SetLastError
(
CRYPT_E_ASN1_CORRUPT
);
ret
=
FALSE
;
...
...
@@ -520,7 +518,7 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
nextData
=
(
BYTE
*
)
pvStructInfo
+
structSize
;
memset
(
pvStructInfo
,
0
,
structSize
);
ret
=
CRYPT_AsnDecodeSequenceItems
(
items
,
cItem
,
ptr
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
nextData
,
ptr
,
dataLen
,
dwFlags
,
pvStructInfo
,
nextData
,
&
cbDecoded
);
}
}
...
...
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