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
d5d3efd5
Commit
d5d3efd5
authored
Jun 22, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix a couple of assumptions about structure layout.
parent
72a95ffa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
decode.c
dlls/crypt32/decode.c
+1
-1
encode.c
dlls/crypt32/encode.c
+5
-6
No files found.
dlls/crypt32/decode.c
View file @
d5d3efd5
...
...
@@ -523,7 +523,7 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
for
(
i
=
0
;
i
<
cItem
;
i
++
)
{
bytesNeeded
+=
items
[
i
].
size
;
structSize
+=
items
[
i
].
minSize
;
structSize
=
max
(
structSize
,
items
[
i
].
offset
+
items
[
i
].
minSize
)
;
}
if
(
pcbDecoded
)
*
pcbDecoded
=
1
+
lenBytes
+
cbDecoded
;
...
...
dlls/crypt32/encode.c
View file @
d5d3efd5
...
...
@@ -564,13 +564,12 @@ static BOOL WINAPI CRYPT_AsnEncodeCRLEntries(DWORD dwCertEncodingType,
LPCSTR
lpszStructType
,
const
void
*
pvStructInfo
,
DWORD
dwFlags
,
PCRYPT_ENCODE_PARA
pEncodePara
,
BYTE
*
pbEncoded
,
DWORD
*
pcbEncoded
)
{
DWORD
cCRLEntry
=
*
(
const
DWORD
*
)
pvStructInfo
;
DWORD
bytesNeeded
,
dataLen
,
lenBytes
,
i
;
const
CRL_
ENTRY
*
rgCRLEntry
=
*
(
const
CRL_ENTRY
*
const
*
)
((
const
BYTE
*
)
pvStructInfo
+
sizeof
(
DWORD
))
;
const
CRL_
INFO
*
info
=
pvStructInfo
;
const
CRL_ENTRY
*
rgCRLEntry
=
info
->
rgCRLEntry
;
BOOL
ret
=
TRUE
;
for
(
i
=
0
,
dataLen
=
0
;
ret
&&
i
<
cCRLEntry
;
i
++
)
for
(
i
=
0
,
dataLen
=
0
;
ret
&&
i
<
info
->
cCRLEntry
;
i
++
)
{
DWORD
size
;
...
...
@@ -594,7 +593,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCRLEntries(DWORD dwCertEncodingType,
*
pbEncoded
++
=
ASN_SEQUENCEOF
;
CRYPT_EncodeLen
(
dataLen
,
pbEncoded
,
&
lenBytes
);
pbEncoded
+=
lenBytes
;
for
(
i
=
0
;
i
<
cCRLEntry
;
i
++
)
for
(
i
=
0
;
i
<
info
->
cCRLEntry
;
i
++
)
{
DWORD
size
=
dataLen
;
...
...
@@ -659,7 +658,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCRLInfo(DWORD dwCertEncodingType,
}
if
(
info
->
cCRLEntry
)
{
items
[
cItem
].
pvStructInfo
=
&
info
->
cCRLEntry
;
items
[
cItem
].
pvStructInfo
=
info
;
items
[
cItem
].
encodeFunc
=
CRYPT_AsnEncodeCRLEntries
;
cItem
++
;
}
...
...
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