net: prevent 0xC0000005 errors in vschannel (windows ssl) (#10531)
parent
ae12a0b8f1
commit
5d138768e9
|
@ -507,7 +507,7 @@ static SECURITY_STATUS client_handshake_loop(TlsContext *tls_ctx, BOOL fDoInitia
|
|||
// Allocate data buffer.
|
||||
//
|
||||
|
||||
IoBuffer = LocalAlloc(LMEM_FIXED, IO_BUFFER_SIZE);
|
||||
IoBuffer = LocalAlloc(LPTR, IO_BUFFER_SIZE);
|
||||
if(IoBuffer == NULL)
|
||||
{
|
||||
wprintf(L"Out of memory (1)\n");
|
||||
|
@ -630,8 +630,7 @@ static SECURITY_STATUS client_handshake_loop(TlsContext *tls_ctx, BOOL fDoInitia
|
|||
|
||||
if(InBuffers[1].BufferType == SECBUFFER_EXTRA)
|
||||
{
|
||||
pExtraData->pvBuffer = LocalAlloc(LMEM_FIXED,
|
||||
InBuffers[1].cbBuffer);
|
||||
pExtraData->pvBuffer = LocalAlloc(LPTR, InBuffers[1].cbBuffer);
|
||||
if(pExtraData->pvBuffer == NULL) {
|
||||
wprintf(L"Out of memory (2)\n");
|
||||
return SEC_E_INTERNAL_ERROR;
|
||||
|
@ -741,7 +740,7 @@ static SECURITY_STATUS https_make_request(TlsContext *tls_ctx, CHAR *req, CHAR *
|
|||
// size of this plus the header and trailer sizes should be safe enough.
|
||||
cbIoBufferLength = Sizes.cbHeader + Sizes.cbMaximumMessage + Sizes.cbTrailer;
|
||||
|
||||
pbIoBuffer = LocalAlloc(LMEM_FIXED, cbIoBufferLength);
|
||||
pbIoBuffer = LocalAlloc(LPTR, cbIoBufferLength);
|
||||
if(pbIoBuffer == NULL) {
|
||||
wprintf(L"Out of memory (2)\n");
|
||||
return SEC_E_INTERNAL_ERROR;
|
||||
|
|
Loading…
Reference in New Issue