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
dd26bee1
Commit
dd26bee1
authored
Oct 20, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Oct 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix duplicating a NULL CTL context.
parent
acc9d81f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
ctl.c
dlls/crypt32/ctl.c
+1
-0
ctl.c
dlls/crypt32/tests/ctl.c
+16
-0
No files found.
dlls/crypt32/ctl.c
View file @
dd26bee1
...
...
@@ -455,6 +455,7 @@ end:
PCCTL_CONTEXT
WINAPI
CertDuplicateCTLContext
(
PCCTL_CONTEXT
pCtlContext
)
{
TRACE
(
"(%p)
\n
"
,
pCtlContext
);
if
(
pCtlContext
)
Context_AddRef
((
void
*
)
pCtlContext
,
sizeof
(
CTL_CONTEXT
));
return
pCtlContext
;
}
...
...
dlls/crypt32/tests/ctl.c
View file @
dd26bee1
...
...
@@ -187,6 +187,21 @@ static void testCreateCTL(void)
CertFreeCTLContext
(
ctl
);
}
static
void
testDupCTL
(
void
)
{
PCCTL_CONTEXT
context
,
dupContext
;
context
=
CertDuplicateCTLContext
(
NULL
);
ok
(
context
==
NULL
,
"expected NULL
\n
"
);
context
=
CertCreateCTLContext
(
X509_ASN_ENCODING
,
signedCTLWithCTLInnerContent
,
sizeof
(
signedCTLWithCTLInnerContent
));
dupContext
=
CertDuplicateCTLContext
(
context
);
ok
(
dupContext
!=
NULL
,
"expected a context
\n
"
);
ok
(
dupContext
==
context
,
"expected identical context addresses
\n
"
);
CertFreeCTLContext
(
dupContext
);
CertFreeCTLContext
(
context
);
}
static
void
checkHash
(
const
BYTE
*
data
,
DWORD
dataLen
,
ALG_ID
algID
,
PCCTL_CONTEXT
context
,
DWORD
propID
)
{
...
...
@@ -444,6 +459,7 @@ static void testAddCTLToStore(void)
START_TEST
(
ctl
)
{
testCreateCTL
();
testDupCTL
();
testCTLProperties
();
testAddCTLToStore
();
}
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