Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
19956d6e
Commit
19956d6e
authored
Sep 18, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Pass length rather than entire message to CRYPT_EncodeContentLength.
parent
145d5684
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
msg.c
dlls/crypt32/msg.c
+6
-6
No files found.
dlls/crypt32/msg.c
View file @
19956d6e
...
...
@@ -113,7 +113,7 @@ static WINAPI BOOL CRYPT_EncodeContentLength(DWORD dwCertEncodingType,
LPCSTR
lpszStructType
,
const
void
*
pvStructInfo
,
DWORD
dwFlags
,
PCRYPT_ENCODE_PARA
pEncodePara
,
BYTE
*
pbEncoded
,
DWORD
*
pcbEncoded
)
{
const
CDataEncodeMsg
*
msg
=
(
const
CDataEncodeMsg
*
)
pvStructInfo
;
DWORD
dataLen
=
*
(
DWORD
*
)
pvStructInfo
;
DWORD
lenBytes
;
BOOL
ret
=
TRUE
;
...
...
@@ -121,9 +121,9 @@ static WINAPI BOOL CRYPT_EncodeContentLength(DWORD dwCertEncodingType,
* the message isn't available yet. The caller will use the length
* reported here to encode its length.
*/
CRYPT_EncodeLen
(
msg
->
base
.
stream_info
.
cbContent
,
NULL
,
&
lenBytes
);
CRYPT_EncodeLen
(
dataLen
,
NULL
,
&
lenBytes
);
if
(
!
pbEncoded
)
*
pcbEncoded
=
1
+
lenBytes
+
msg
->
base
.
stream_info
.
cbContent
;
*
pcbEncoded
=
1
+
lenBytes
+
dataLen
;
else
{
if
((
ret
=
CRYPT_EncodeEnsureSpace
(
dwFlags
,
pEncodePara
,
pbEncoded
,
...
...
@@ -132,7 +132,7 @@ static WINAPI BOOL CRYPT_EncodeContentLength(DWORD dwCertEncodingType,
if
(
dwFlags
&
CRYPT_ENCODE_ALLOC_FLAG
)
pbEncoded
=
*
(
BYTE
**
)
pbEncoded
;
*
pbEncoded
++
=
ASN_OCTETSTRING
;
CRYPT_EncodeLen
(
msg
->
base
.
stream_info
.
cbContent
,
pbEncoded
,
CRYPT_EncodeLen
(
dataLen
,
pbEncoded
,
&
lenBytes
);
}
}
...
...
@@ -153,8 +153,8 @@ static BOOL CRYPT_EncodeDataContentInfoHeader(CDataEncodeMsg *msg,
}
else
{
struct
AsnConstructedItem
constructed
=
{
0
,
msg
,
CRYPT_EncodeContentLength
};
struct
AsnConstructedItem
constructed
=
{
0
,
&
msg
->
base
.
stream_info
.
cbContent
,
CRYPT_EncodeContentLength
};
struct
AsnEncodeSequenceItem
items
[
2
]
=
{
{
szOID_RSA_data
,
CRYPT_AsnEncodeOid
,
0
},
{
&
constructed
,
CRYPT_AsnEncodeConstructed
,
0
},
...
...
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