Loading lib/asyn-ares.c +1 −1 Original line number Diff line number Diff line Loading @@ -572,7 +572,7 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, conn->async.done = FALSE; /* not done */ conn->async.status = 0; /* clear */ conn->async.dns = NULL; /* clear */ res = (struct ResolverResults *)calloc(sizeof(struct ResolverResults),1); res = calloc(sizeof(struct ResolverResults),1); if(!res) { Curl_safefree(conn->async.hostname); conn->async.hostname = NULL; Loading lib/cookie.c +1 −1 Original line number Diff line number Diff line Loading @@ -877,7 +877,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, size_t i; /* alloc an array and store all cookie pointers */ array = (struct Cookie **)malloc(sizeof(struct Cookie *) * matches); array = malloc(sizeof(struct Cookie *) * matches); if(!array) goto fail; Loading lib/http_negotiate_sspi.c +3 −3 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, /* Allocate input and output buffers according to the max token size as indicated by the security package */ neg_ctx->max_token_length = SecurityPackage->cbMaxToken; neg_ctx->output_token = (BYTE *)malloc(neg_ctx->max_token_length); neg_ctx->output_token = malloc(neg_ctx->max_token_length); s_pSecFn->FreeContextBuffer(SecurityPackage); } Loading @@ -157,8 +157,8 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, /* first call in a new negotation, we have to acquire credentials, and allocate memory for the context */ neg_ctx->credentials = (CredHandle *)malloc(sizeof(CredHandle)); neg_ctx->context = (CtxtHandle *)malloc(sizeof(CtxtHandle)); neg_ctx->credentials = malloc(sizeof(CredHandle)); neg_ctx->context = malloc(sizeof(CtxtHandle)); if(!neg_ctx->credentials || !neg_ctx->context) return -1; Loading lib/idn_win32.c +2 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ static wchar_t *_curl_win32_UTF8_to_wchar(const char *str_utf8) int str_w_len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str_utf8, -1, NULL, 0); if(str_w_len) { str_w = (wchar_t *) malloc(str_w_len * sizeof(wchar_t)); str_w = malloc(str_w_len * sizeof(wchar_t)); if(str_w) { if(MultiByteToWideChar(CP_UTF8, 0, str_utf8, -1, str_w, str_w_len) == 0) { Loading @@ -65,7 +65,7 @@ static const char *_curl_win32_wchar_to_UTF8(const wchar_t *str_w) size_t str_utf8_len = WideCharToMultiByte(CP_UTF8, 0, str_w, -1, NULL, 0, NULL, NULL); if(str_utf8_len) { str_utf8 = (char *) malloc(str_utf8_len * sizeof(wchar_t)); str_utf8 = malloc(str_utf8_len * sizeof(wchar_t)); if(str_utf8) { if(WideCharToMultiByte(CP_UTF8, 0, str_w, -1, str_utf8, str_utf8_len, NULL, FALSE) == 0) { Loading src/urlglob.c +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ static GlobCode glob_set(URLGlob *glob, char *pattern, pat->content.Set.size = 0; pat->content.Set.ptr_s = 0; /* FIXME: Here's a nasty zero size malloc */ pat->content.Set.elements = (char**)malloc(0); pat->content.Set.elements = malloc(0); ++glob->size; while(!done) { Loading Loading
lib/asyn-ares.c +1 −1 Original line number Diff line number Diff line Loading @@ -572,7 +572,7 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, conn->async.done = FALSE; /* not done */ conn->async.status = 0; /* clear */ conn->async.dns = NULL; /* clear */ res = (struct ResolverResults *)calloc(sizeof(struct ResolverResults),1); res = calloc(sizeof(struct ResolverResults),1); if(!res) { Curl_safefree(conn->async.hostname); conn->async.hostname = NULL; Loading
lib/cookie.c +1 −1 Original line number Diff line number Diff line Loading @@ -877,7 +877,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, size_t i; /* alloc an array and store all cookie pointers */ array = (struct Cookie **)malloc(sizeof(struct Cookie *) * matches); array = malloc(sizeof(struct Cookie *) * matches); if(!array) goto fail; Loading
lib/http_negotiate_sspi.c +3 −3 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, /* Allocate input and output buffers according to the max token size as indicated by the security package */ neg_ctx->max_token_length = SecurityPackage->cbMaxToken; neg_ctx->output_token = (BYTE *)malloc(neg_ctx->max_token_length); neg_ctx->output_token = malloc(neg_ctx->max_token_length); s_pSecFn->FreeContextBuffer(SecurityPackage); } Loading @@ -157,8 +157,8 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy, /* first call in a new negotation, we have to acquire credentials, and allocate memory for the context */ neg_ctx->credentials = (CredHandle *)malloc(sizeof(CredHandle)); neg_ctx->context = (CtxtHandle *)malloc(sizeof(CtxtHandle)); neg_ctx->credentials = malloc(sizeof(CredHandle)); neg_ctx->context = malloc(sizeof(CtxtHandle)); if(!neg_ctx->credentials || !neg_ctx->context) return -1; Loading
lib/idn_win32.c +2 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ static wchar_t *_curl_win32_UTF8_to_wchar(const char *str_utf8) int str_w_len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str_utf8, -1, NULL, 0); if(str_w_len) { str_w = (wchar_t *) malloc(str_w_len * sizeof(wchar_t)); str_w = malloc(str_w_len * sizeof(wchar_t)); if(str_w) { if(MultiByteToWideChar(CP_UTF8, 0, str_utf8, -1, str_w, str_w_len) == 0) { Loading @@ -65,7 +65,7 @@ static const char *_curl_win32_wchar_to_UTF8(const wchar_t *str_w) size_t str_utf8_len = WideCharToMultiByte(CP_UTF8, 0, str_w, -1, NULL, 0, NULL, NULL); if(str_utf8_len) { str_utf8 = (char *) malloc(str_utf8_len * sizeof(wchar_t)); str_utf8 = malloc(str_utf8_len * sizeof(wchar_t)); if(str_utf8) { if(WideCharToMultiByte(CP_UTF8, 0, str_w, -1, str_utf8, str_utf8_len, NULL, FALSE) == 0) { Loading
src/urlglob.c +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ static GlobCode glob_set(URLGlob *glob, char *pattern, pat->content.Set.size = 0; pat->content.Set.ptr_s = 0; /* FIXME: Here's a nasty zero size malloc */ pat->content.Set.elements = (char**)malloc(0); pat->content.Set.elements = malloc(0); ++glob->size; while(!done) { Loading