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
07ba16c2
Commit
07ba16c2
authored
Aug 20, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Aug 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Use a helper function to allocate signer handles.
parent
1f9d9be7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
msg.c
dlls/crypt32/msg.c
+25
-12
No files found.
dlls/crypt32/msg.c
View file @
07ba16c2
...
...
@@ -807,6 +807,28 @@ static BOOL CSignerHandles_Construct(CSignerHandles *handles,
return
ret
;
}
/* Allocates a CSignedMsgData's handles. Assumes its info has already been
* constructed.
*/
static
BOOL
CSignedMsgData_AllocateHandles
(
CSignedMsgData
*
msg_data
)
{
BOOL
ret
=
TRUE
;
if
(
msg_data
->
info
->
cSignerInfo
)
{
msg_data
->
signerHandles
=
CryptMemAlloc
(
msg_data
->
info
->
cSignerInfo
*
sizeof
(
CSignerHandles
));
if
(
msg_data
->
signerHandles
)
memset
(
msg_data
->
signerHandles
,
0
,
msg_data
->
info
->
cSignerInfo
*
sizeof
(
CSignerHandles
));
else
ret
=
FALSE
;
}
else
msg_data
->
signerHandles
=
NULL
;
return
ret
;
}
static
void
CSignedMsgData_CloseHandles
(
CSignedMsgData
*
msg_data
)
{
DWORD
i
;
...
...
@@ -1185,23 +1207,14 @@ static HCRYPTMSG CSignedEncodeMsg_Open(DWORD dwFlags,
ret
=
FALSE
;
if
(
ret
&&
info
->
cSigners
)
{
msg
->
msg_data
.
signerHandles
=
CryptMemAlloc
(
info
->
cSigners
*
sizeof
(
CSignerHandles
));
if
(
msg
->
msg_data
.
signerHandles
)
msg
->
msg_data
.
info
->
rgSignerInfo
=
CryptMemAlloc
(
info
->
cSigners
*
sizeof
(
CMSG_SIGNER_INFO
));
else
{
ret
=
FALSE
;
msg
->
msg_data
.
info
->
rgSignerInfo
=
NULL
;
}
msg
->
msg_data
.
info
->
rgSignerInfo
=
CryptMemAlloc
(
info
->
cSigners
*
sizeof
(
CMSG_SIGNER_INFO
));
if
(
msg
->
msg_data
.
info
->
rgSignerInfo
)
{
msg
->
msg_data
.
info
->
cSignerInfo
=
info
->
cSigners
;
memset
(
msg
->
msg_data
.
signerHandles
,
0
,
msg
->
msg_data
.
info
->
cSignerInfo
*
sizeof
(
CSignerHandles
));
memset
(
msg
->
msg_data
.
info
->
rgSignerInfo
,
0
,
msg
->
msg_data
.
info
->
cSignerInfo
*
sizeof
(
CMSG_SIGNER_INFO
));
ret
=
CSignedMsgData_AllocateHandles
(
&
msg
->
msg_data
);
for
(
i
=
0
;
ret
&&
i
<
msg
->
msg_data
.
info
->
cSignerInfo
;
i
++
)
{
ret
=
CSignerInfo_Construct
(
...
...
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