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
d9229bd1
Commit
d9229bd1
authored
Mar 06, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: NTLM - don't bother nul terminating the password string as nothing…
secur32: NTLM - don't bother nul terminating the password string as nothing relies on it being nul terminated.
parent
3012038e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
ntlm.c
dlls/secur32/ntlm.c
+5
-6
No files found.
dlls/secur32/ntlm.c
View file @
d9229bd1
...
...
@@ -227,7 +227,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
helper
->
pwlen
=
WideCharToMultiByte
(
CP_UNIXCP
,
WC_NO_BEST_FIT_CHARS
,
auth_data
->
Password
,
auth_data
->
PasswordLength
,
NULL
,
0
,
NULL
,
NULL
)
+
1
;
NULL
);
helper
->
password
=
HeapAlloc
(
GetProcessHeap
(),
0
,
helper
->
pwlen
);
...
...
@@ -235,7 +235,6 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
WideCharToMultiByte
(
CP_UNIXCP
,
WC_NO_BEST_FIT_CHARS
,
auth_data
->
Password
,
auth_data
->
PasswordLength
,
helper
->
password
,
helper
->
pwlen
,
NULL
,
NULL
);
helper
->
password
[
helper
->
pwlen
-
1
]
=
'\0'
;
}
}
...
...
@@ -507,11 +506,11 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
{
lstrcpynA
(
buffer
,
"PW "
,
max_len
-
1
);
if
((
ret
=
encodeBase64
((
unsigned
char
*
)
helper
->
password
,
helper
->
pwlen
-
1
,
buffer
+
3
,
helper
->
pwlen
,
buffer
+
3
,
max_len
-
3
,
&
buffer_len
))
!=
SEC_E_OK
)
{
TRACE
(
"Deleting password!
\n
"
);
memset
(
helper
->
password
,
0
,
helper
->
pwlen
-
1
);
memset
(
helper
->
password
,
0
,
helper
->
pwlen
);
HeapFree
(
GetProcessHeap
(),
0
,
helper
->
password
);
goto
isc_end
;
}
...
...
@@ -695,7 +694,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
helper
->
pwlen
,
unicode_password
,
passwd_lenW
);
SECUR32_CreateNTLMv1SessionKey
((
PBYTE
)
unicode_password
,
lstrlenW
(
unicode_password
)
*
sizeof
(
SEC_WCHAR
),
helper
->
session_key
);
passwd_lenW
*
sizeof
(
SEC_WCHAR
),
helper
->
session_key
);
HeapFree
(
GetProcessHeap
(),
0
,
unicode_password
);
}
...
...
@@ -739,7 +738,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
{
TRACE
(
"Deleting password!
\n
"
);
if
(
helper
->
password
)
memset
(
helper
->
password
,
0
,
helper
->
pwlen
-
1
);
memset
(
helper
->
password
,
0
,
helper
->
pwlen
);
HeapFree
(
GetProcessHeap
(),
0
,
helper
->
password
);
}
isc_end:
...
...
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