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
0e967a5c
Commit
0e967a5c
authored
Nov 07, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Use SecureZeroMemory to clear magic fields.
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
2367415d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lsa.c
dlls/secur32/lsa.c
+4
-2
No files found.
dlls/secur32/lsa.c
View file @
0e967a5c
...
@@ -156,7 +156,8 @@ NTSTATUS WINAPI LsaDeregisterLogonProcess(HANDLE LsaHandle)
...
@@ -156,7 +156,8 @@ NTSTATUS WINAPI LsaDeregisterLogonProcess(HANDLE LsaHandle)
TRACE
(
"%p
\n
"
,
LsaHandle
);
TRACE
(
"%p
\n
"
,
LsaHandle
);
if
(
!
lsa_conn
||
lsa_conn
->
magic
!=
LSA_MAGIC_CONNECTION
)
return
STATUS_INVALID_HANDLE
;
if
(
!
lsa_conn
||
lsa_conn
->
magic
!=
LSA_MAGIC_CONNECTION
)
return
STATUS_INVALID_HANDLE
;
lsa_conn
->
magic
=
0
;
/* Ensure compiler doesn't optimize out the assignment with 0. */
SecureZeroMemory
(
&
lsa_conn
->
magic
,
sizeof
(
lsa_conn
->
magic
));
free
(
lsa_conn
);
free
(
lsa_conn
);
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
...
@@ -465,7 +466,8 @@ static SECURITY_STATUS WINAPI lsa_FreeCredentialsHandle(CredHandle *credential)
...
@@ -465,7 +466,8 @@ static SECURITY_STATUS WINAPI lsa_FreeCredentialsHandle(CredHandle *credential)
status
=
lsa_cred
->
package
->
lsa_api
->
FreeCredentialsHandle
(
lsa_cred
->
handle
);
status
=
lsa_cred
->
package
->
lsa_api
->
FreeCredentialsHandle
(
lsa_cred
->
handle
);
lsa_cred
->
magic
=
0
;
/* Ensure compiler doesn't optimize out the assignment with 0. */
SecureZeroMemory
(
&
lsa_cred
->
magic
,
sizeof
(
lsa_cred
->
magic
));
free
(
lsa_cred
);
free
(
lsa_cred
);
return
status
;
return
status
;
}
}
...
...
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