[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

svn path=/trunk/; revision=75027
This commit is contained in:
Thomas Faber 2017-06-13 20:51:26 +00:00
parent 74cca4dd1e
commit 74a68e0f6b

View file

@ -718,7 +718,14 @@ schan_imp_session schan_session_for_transport(struct schan_transport* t)
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 @@ SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
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 */