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
2367415d
Commit
2367415d
authored
Nov 07, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dssenh: Use SecureZeroMemory to clear magic fields.
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
68edddc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
main.c
dlls/dssenh/main.c
+6
-3
No files found.
dlls/dssenh/main.c
View file @
2367415d
...
...
@@ -162,7 +162,8 @@ static void destroy_key( struct key *key )
{
if
(
!
key
)
return
;
BCryptDestroyKey
(
key
->
handle
);
key
->
magic
=
0
;
/* Ensure compiler doesn't optimize out the assignment with 0. */
SecureZeroMemory
(
&
key
->
magic
,
sizeof
(
key
->
magic
)
);
free
(
key
);
}
...
...
@@ -213,7 +214,8 @@ static void destroy_container( struct container *container )
if
(
!
container
)
return
;
destroy_key
(
container
->
exch_key
);
destroy_key
(
container
->
sign_key
);
container
->
magic
=
0
;
/* Ensure compiler doesn't optimize out the assignment with 0. */
SecureZeroMemory
(
&
container
->
magic
,
sizeof
(
container
->
magic
)
);
free
(
container
);
}
...
...
@@ -821,7 +823,8 @@ static void destroy_hash( struct hash *hash )
{
if
(
!
hash
)
return
;
BCryptDestroyHash
(
hash
->
handle
);
hash
->
magic
=
0
;
/* Ensure compiler doesn't optimize out the assignment with 0. */
SecureZeroMemory
(
&
hash
->
magic
,
sizeof
(
hash
->
magic
)
);
free
(
hash
);
}
...
...
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