Henri Verbeet : secur32: Try an EMPTY buffer if we can' t find one of type TOKEN.
Alexandre Julliard
julliard at winehq.org
Mon Dec 29 08:47:38 CST 2008
Module: wine
Branch: master
Commit: 7bf267624d3562743e9e020c421b9f29f8cdb62f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7bf267624d3562743e9e020c421b9f29f8cdb62f
Author: Henri Verbeet <hverbeet at gmail.com>
Date: Sun Dec 28 22:21:35 2008 +0100
secur32: Try an EMPTY buffer if we can't find one of type TOKEN.
---
dlls/secur32/schannel.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index 5ba4dfc..1c99c84 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -607,9 +607,15 @@ static int schan_init_sec_ctx_get_next_buffer(const struct schan_transport *t, s
if (s->current_buffer_idx == -1)
{
int idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_TOKEN);
- if (idx != -1 && !s->desc->pBuffers[idx].pvBuffer
- && (t->ctx->req_ctx_attr & ISC_REQ_ALLOCATE_MEMORY))
- s->allow_buffer_resize = TRUE;
+ if (t->ctx->req_ctx_attr & ISC_REQ_ALLOCATE_MEMORY)
+ {
+ if (idx == -1)
+ {
+ idx = schan_find_sec_buffer_idx(s->desc, 0, SECBUFFER_EMPTY);
+ if (idx != -1) s->desc->pBuffers[idx].BufferType = SECBUFFER_TOKEN;
+ }
+ if (idx != -1 && !s->desc->pBuffers[idx].pvBuffer) s->allow_buffer_resize = TRUE;
+ }
return idx;
}
More information about the wine-cvs
mailing list