Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
758e7cad
Commit
758e7cad
authored
Apr 18, 2018
by
Alistair Leslie-Hughes
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Add parameter check in WTHelperGetProvCertFromChain
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
parent
8f4a209d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
softpub.c
dlls/wintrust/tests/softpub.c
+9
-0
wintrust_main.c
dlls/wintrust/wintrust_main.c
+1
-1
No files found.
dlls/wintrust/tests/softpub.c
View file @
758e7cad
...
...
@@ -1312,6 +1312,14 @@ static void test_get_known_usages(void)
"expected ERROR_INVALID_PARAMETER, got %ld
\n
"
,
GetLastError
());
}
static
void
test_WTHelperGetProvCertFromChain
(
void
)
{
CRYPT_PROVIDER_CERT
*
cert
;
cert
=
WTHelperGetProvCertFromChain
(
NULL
,
0
);
ok
(
!
cert
,
"got certificate
\n
"
);
}
START_TEST
(
softpub
)
{
InitFunctionPtrs
();
...
...
@@ -1320,4 +1328,5 @@ START_TEST(softpub)
test_wintrust
();
test_wintrust_digest
();
test_get_known_usages
();
test_WTHelperGetProvCertFromChain
();
}
dlls/wintrust/wintrust_main.c
View file @
758e7cad
...
...
@@ -782,7 +782,7 @@ CRYPT_PROVIDER_CERT * WINAPI WTHelperGetProvCertFromChain(
TRACE
(
"(%p %ld)
\n
"
,
pSgnr
,
idxCert
);
if
(
idxCert
>=
pSgnr
->
csCertChain
||
!
pSgnr
->
pasCertChain
)
if
(
!
pSgnr
||
idxCert
>=
pSgnr
->
csCertChain
||
!
pSgnr
->
pasCertChain
)
return
NULL
;
cert
=
&
pSgnr
->
pasCertChain
[
idxCert
];
TRACE
(
"returning %p
\n
"
,
cert
);
...
...
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