Author: tfaber
Date: Tue Jun 13 20:51:26 2017
New Revision: 75027
URL:
http://svn.reactos.org/svn/reactos?rev=75027&view=rev
Log:
[SCHANNEL]
- Apply Wine commit 81861ddd (secur32: Don't change input buffer in
InitializeSecurityContext) by Jacek Caban. Fixes crash when running
secur32_winetest:schannel
CORE-13425 #resolve
Modified:
trunk/reactos/dll/win32/schannel/schannel_wine.c
Modified: trunk/reactos/dll/win32/schannel/schannel_wine.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/schannel/schanne…
==============================================================================
--- trunk/reactos/dll/win32/schannel/schannel_wine.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/schannel/schannel_wine.c [iso-8859-1] Tue Jun 13 20:51:26
2017
@@ -718,7 +718,14 @@
return t->ctx->session;
}
-static int schan_init_sec_ctx_get_next_buffer(const struct schan_transport *t, struct
schan_buffers *s)
+static int schan_init_sec_ctx_get_next_input_buffer(const struct schan_transport *t,
struct schan_buffers *s)
+{
+ if (s->current_buffer_idx != -1)
+ return -1;
+ return schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN);
+}
+
+static int schan_init_sec_ctx_get_next_output_buffer(const struct schan_transport *t,
struct schan_buffers *s)
{
if (s->current_buffer_idx == -1)
{
@@ -870,9 +877,9 @@
ctx->req_ctx_attr = fContextReq;
transport.ctx = ctx;
- init_schan_buffers(&transport.in, pInput, schan_init_sec_ctx_get_next_buffer);
+ init_schan_buffers(&transport.in, pInput,
schan_init_sec_ctx_get_next_input_buffer);
transport.in.limit = expected_size;
- init_schan_buffers(&transport.out, pOutput, schan_init_sec_ctx_get_next_buffer);
+ init_schan_buffers(&transport.out, pOutput,
schan_init_sec_ctx_get_next_output_buffer);
schan_imp_set_session_transport(ctx->session, &transport);
/* Perform the TLS handshake */