From: Marc Hoersken Date: Sun, 26 Apr 2015 15:59:01 +0000 (+0200) Subject: schannel.c: Fix possible SEC_E_BUFFER_TOO_SMALL error X-Git-Tag: curl-7_43_0~214 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a91e80;p=thirdparty%2Fcurl.git schannel.c: Fix possible SEC_E_BUFFER_TOO_SMALL error Reported-by: Brian Chrisman --- diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index e9f455e445..7d25fd7d05 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2014, Marc Hoersken, + * Copyright (C) 2012 - 2015, Marc Hoersken, * Copyright (C) 2012, Mark Salisbury, * Copyright (C) 2012 - 2015, Daniel Stenberg, , et al. * @@ -368,7 +368,8 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) /* setup output buffers */ InitSecBuffer(&outbuf[0], SECBUFFER_TOKEN, NULL, 0); InitSecBuffer(&outbuf[1], SECBUFFER_ALERT, NULL, 0); - InitSecBufferDesc(&outbuf_desc, outbuf, 2); + InitSecBuffer(&outbuf[2], SECBUFFER_EMPTY, NULL, 0); + InitSecBufferDesc(&outbuf_desc, outbuf, 3); if(inbuf[0].pvBuffer == NULL) { failf(data, "schannel: unable to allocate memory");