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
0868486d
Commit
0868486d
authored
Mar 29, 2014
by
Thomas Faber
Committed by
Alexandre Julliard
Mar 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Remove unnecessary buffer copy in CredMarshalCredentialW.
parent
f9fae1b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
cred.c
dlls/advapi32/cred.c
+3
-8
No files found.
dlls/advapi32/cred.c
View file @
0868486d
...
...
@@ -1952,18 +1952,13 @@ BOOL WINAPI CredMarshalCredentialW( CRED_MARSHAL_TYPE type, PVOID cred, LPWSTR *
{
case
CertCredential
:
{
char
hash
[
CERT_HASH_LENGTH
+
2
];
memcpy
(
hash
,
cert
->
rgbHashOfCert
,
sizeof
(
cert
->
rgbHashOfCert
)
);
memset
(
hash
+
sizeof
(
cert
->
rgbHashOfCert
),
0
,
sizeof
(
hash
)
-
sizeof
(
cert
->
rgbHashOfCert
)
);
size
=
sizeof
(
hash
)
*
4
/
3
;
size
=
(
sizeof
(
cert
->
rgbHashOfCert
)
+
2
)
*
4
/
3
;
if
(
!
(
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
size
+
4
)
*
sizeof
(
WCHAR
)
)))
return
FALSE
;
p
[
0
]
=
'@'
;
p
[
1
]
=
'@'
;
p
[
2
]
=
'A'
+
type
;
len
=
cred_encode
(
(
const
char
*
)
hash
,
sizeof
(
hash
),
p
+
3
);
p
[
len
]
=
0
;
len
=
cred_encode
(
(
const
char
*
)
cert
->
rgbHashOfCert
,
sizeof
(
cert
->
rgbHashOfCert
),
p
+
3
);
p
[
len
+
3
]
=
0
;
break
;
}
case
UsernameTargetCredential
:
...
...
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