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
c7109645
Commit
c7109645
authored
Dec 23, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Test find handles against INVALID_HANDLE_VALUE.
Spotted by Michael Stefaniuc.
parent
a4c2a0ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
crypt.c
dlls/wintrust/crypt.c
+6
-6
No files found.
dlls/wintrust/crypt.c
View file @
c7109645
...
...
@@ -139,7 +139,7 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN *catAdmin,
CreateDirectoryW
(
ca
->
path
,
NULL
);
ca
->
magic
=
CATADMIN_MAGIC
;
ca
->
find
=
NULL
;
ca
->
find
=
INVALID_HANDLE_VALUE
;
*
catAdmin
=
ca
;
return
TRUE
;
...
...
@@ -304,11 +304,11 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa
strcpyW
(
path
,
ca
->
path
);
strcatW
(
path
,
globW
);
if
(
ca
->
find
)
FindClose
(
ca
->
find
);
FindClose
(
ca
->
find
);
ca
->
find
=
FindFirstFileW
(
path
,
&
data
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
if
(
!
ca
->
find
)
if
(
ca
->
find
==
INVALID_HANDLE_VALUE
)
{
CryptReleaseContext
(
prov
,
0
);
return
NULL
;
...
...
@@ -360,7 +360,7 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa
if
(
!
phPrevCatInfo
)
{
FindClose
(
ca
->
find
);
ca
->
find
=
NULL
;
ca
->
find
=
INVALID_HANDLE_VALUE
;
}
ci
=
create_catinfo
(
filename
);
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
...
...
@@ -373,7 +373,7 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa
if
(
!
FindNextFileW
(
ca
->
find
,
&
data
))
{
FindClose
(
ca
->
find
);
ca
->
find
=
NULL
;
ca
->
find
=
INVALID_HANDLE_VALUE
;
CryptReleaseContext
(
prov
,
0
);
return
NULL
;
}
...
...
@@ -439,7 +439,7 @@ BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN hCatAdmin, DWORD dwFlags )
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
ca
->
find
)
FindClose
(
ca
->
find
);
if
(
ca
->
find
!=
INVALID_HANDLE_VALUE
)
FindClose
(
ca
->
find
);
ca
->
magic
=
0
;
return
HeapFree
(
GetProcessHeap
(),
0
,
ca
);
}
...
...
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