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
fe43d5d4
Commit
fe43d5d4
authored
Aug 14, 2006
by
Kai Blin
Committed by
Alexandre Julliard
Aug 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Copy helper buffer to output buffer before reusing helper buffer.
parent
47519f08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
35 deletions
+38
-35
ntlm.c
dlls/secur32/ntlm.c
+38
-35
No files found.
dlls/secur32/ntlm.c
View file @
fe43d5d4
...
...
@@ -577,6 +577,44 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
goto
isc_end
;
}
phNewContext
->
dwUpper
=
ctxt_attr
;
phNewContext
->
dwLower
=
(
ULONG_PTR
)
helper
;
ret
=
SEC_E_OK
;
}
/* put the decoded client blob into the out buffer */
if
(
fContextReq
&
ISC_REQ_ALLOCATE_MEMORY
)
{
if
(
pOutput
)
{
pOutput
->
cBuffers
=
1
;
pOutput
->
pBuffers
[
0
].
pvBuffer
=
SECUR32_ALLOC
(
bin_len
);
pOutput
->
pBuffers
[
0
].
cbBuffer
=
bin_len
;
}
}
if
(
!
pOutput
||
!
pOutput
->
cBuffers
||
pOutput
->
pBuffers
[
0
].
cbBuffer
<
bin_len
)
{
TRACE
(
"out buffer is NULL or has not enough space
\n
"
);
ret
=
SEC_E_BUFFER_TOO_SMALL
;
goto
isc_end
;
}
if
(
!
pOutput
->
pBuffers
[
0
].
pvBuffer
)
{
TRACE
(
"out buffer is NULL
\n
"
);
ret
=
SEC_E_INTERNAL_ERROR
;
goto
isc_end
;
}
pOutput
->
pBuffers
[
0
].
cbBuffer
=
bin_len
;
pOutput
->
pBuffers
[
0
].
BufferType
=
SECBUFFER_DATA
;
memcpy
(
pOutput
->
pBuffers
[
0
].
pvBuffer
,
bin
,
bin_len
);
if
(
ret
==
SEC_E_OK
)
{
TRACE
(
"Getting negotiated flags
\n
"
);
lstrcpynA
(
buffer
,
"GF"
,
max_len
-
1
);
if
((
ret
=
run_helper
(
helper
,
buffer
,
max_len
,
&
buffer_len
))
!=
SEC_E_OK
)
...
...
@@ -630,43 +668,8 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
memcpy
(
helper
->
session_key
,
bin
,
bin_len
);
}
}
phNewContext
->
dwUpper
=
ctxt_attr
;
phNewContext
->
dwLower
=
(
ULONG_PTR
)
helper
;
ret
=
SEC_E_OK
;
}
/* put the decoded client blob into the out buffer */
if
(
fContextReq
&
ISC_REQ_ALLOCATE_MEMORY
)
{
if
(
pOutput
)
{
pOutput
->
cBuffers
=
1
;
pOutput
->
pBuffers
[
0
].
pvBuffer
=
SECUR32_ALLOC
(
bin_len
);
pOutput
->
pBuffers
[
0
].
cbBuffer
=
bin_len
;
}
}
if
(
!
pOutput
||
!
pOutput
->
cBuffers
||
pOutput
->
pBuffers
[
0
].
cbBuffer
<
bin_len
)
{
TRACE
(
"out buffer is NULL or has not enough space
\n
"
);
ret
=
SEC_E_BUFFER_TOO_SMALL
;
goto
isc_end
;
}
if
(
!
pOutput
->
pBuffers
[
0
].
pvBuffer
)
{
TRACE
(
"out buffer is NULL
\n
"
);
ret
=
SEC_E_INTERNAL_ERROR
;
goto
isc_end
;
}
pOutput
->
pBuffers
[
0
].
cbBuffer
=
bin_len
;
pOutput
->
pBuffers
[
0
].
BufferType
=
SECBUFFER_DATA
;
memcpy
(
pOutput
->
pBuffers
[
0
].
pvBuffer
,
bin
,
bin_len
);
if
(
ret
!=
SEC_I_CONTINUE_NEEDED
)
{
TRACE
(
"Deleting password!
\n
"
);
...
...
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