net.http: fix crash on Windows when using Boehm GC (#14351)
parent
940c78bdfd
commit
9e09b709e3
|
@ -877,7 +877,7 @@ static SECURITY_STATUS https_make_request(TlsContext *tls_ctx, CHAR *req, CHAR *
|
|||
// increase buffer size if we need
|
||||
int required_length = *length+(int)pDataBuffer->cbBuffer;
|
||||
if( required_length > buff_size ) {
|
||||
CHAR *a = realloc(*out, required_length);
|
||||
CHAR *a = VSCHANNEL_REALLOC(*out, required_length);
|
||||
if( a == NULL ) {
|
||||
scRet = SEC_E_INTERNAL_ERROR;
|
||||
return scRet;
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
// Define here to be sure
|
||||
#define SP_PROT_TLS1_2_CLIENT 0x00000800
|
||||
|
||||
#if !defined(VSCHANNEL_REALLOC)
|
||||
#define VSCHANNEL_REALLOC realloc
|
||||
#endif
|
||||
|
||||
typedef struct TlsContext TlsContext;
|
||||
|
||||
TlsContext new_tls_context();
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
// that can be found in the LICENSE file.
|
||||
module http
|
||||
|
||||
$if gcboehm ? {
|
||||
#define VSCHANNEL_REALLOC GC_REALLOC
|
||||
}
|
||||
|
||||
#flag windows -I @VEXEROOT/thirdparty/vschannel
|
||||
#flag -l ws2_32 -l crypt32 -l secur32 -l user32
|
||||
#include "vschannel.c"
|
||||
|
|
Loading…
Reference in New Issue