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
d3c8b59e
Commit
d3c8b59e
authored
Aug 20, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Aug 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Pass address of blob to store data rather than message to CDecodeMsg_CopyData.
parent
1b7121e7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
msg.c
dlls/crypt32/msg.c
+11
-11
No files found.
dlls/crypt32/msg.c
View file @
d3c8b59e
...
...
@@ -1518,22 +1518,22 @@ static void CDecodeMsg_Close(HCRYPTMSG hCryptMsg)
ContextPropertyList_Free
(
msg
->
properties
);
}
static
BOOL
CDecodeMsg_CopyData
(
C
DecodeMsg
*
msg
,
const
BYTE
*
pbData
,
static
BOOL
CDecodeMsg_CopyData
(
C
RYPT_DATA_BLOB
*
blob
,
const
BYTE
*
pbData
,
DWORD
cbData
)
{
BOOL
ret
=
TRUE
;
if
(
cbData
)
{
if
(
msg
->
msg_data
.
cbData
)
msg
->
msg_data
.
pbData
=
CryptMemRealloc
(
msg
->
msg_data
.
pbData
,
msg
->
msg_data
.
cbData
+
cbData
);
if
(
blob
->
cbData
)
blob
->
pbData
=
CryptMemRealloc
(
blob
->
pbData
,
blob
->
cbData
+
cbData
);
else
msg
->
msg_data
.
pbData
=
CryptMemAlloc
(
cbData
);
if
(
msg
->
msg_data
.
pbData
)
blob
->
pbData
=
CryptMemAlloc
(
cbData
);
if
(
blob
->
pbData
)
{
memcpy
(
msg
->
msg_data
.
pbData
+
msg
->
msg_data
.
cbData
,
pbData
,
cbData
);
msg
->
msg_data
.
cbData
+=
cbData
;
memcpy
(
blob
->
pbData
+
blob
->
cbData
,
pbData
,
cbData
);
blob
->
cbData
+=
cbData
;
}
else
ret
=
FALSE
;
...
...
@@ -1768,7 +1768,7 @@ static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
if
(
msg
->
base
.
open_flags
&
CMSG_DETACHED_FLAG
&&
msg
->
base
.
state
!=
MsgStateDataFinalized
)
{
ret
=
CDecodeMsg_CopyData
(
msg
,
pbData
,
cbData
);
ret
=
CDecodeMsg_CopyData
(
&
msg
->
msg_data
,
pbData
,
cbData
);
msg
->
base
.
state
=
MsgStateDataFinalized
;
if
(
ret
)
ret
=
CDecodeMsg_DecodeContent
(
msg
,
&
msg
->
msg_data
,
...
...
@@ -1784,7 +1784,7 @@ static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
}
else
{
ret
=
CDecodeMsg_CopyData
(
msg
,
pbData
,
cbData
);
ret
=
CDecodeMsg_CopyData
(
&
msg
->
msg_data
,
pbData
,
cbData
);
if
(
msg
->
base
.
state
==
MsgStateInit
)
msg
->
base
.
state
=
MsgStateUpdated
;
}
...
...
@@ -1797,7 +1797,7 @@ static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
{
if
(
msg
->
base
.
state
==
MsgStateInit
)
{
ret
=
CDecodeMsg_CopyData
(
msg
,
pbData
,
cbData
);
ret
=
CDecodeMsg_CopyData
(
&
msg
->
msg_data
,
pbData
,
cbData
);
if
(
ret
)
ret
=
CDecodeMsg_DecodeContent
(
msg
,
&
msg
->
msg_data
,
msg
->
type
);
...
...
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