Loading src/tool_getparam.c +13 −5 Original line number Diff line number Diff line Loading @@ -936,6 +936,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ } else { GetStr(&postdata, p); if(postdata) size = strlen(postdata); } Loading Loading @@ -1019,8 +1020,12 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ } #ifdef CURL_DOES_CONVERSIONS if(subletter != 'b') { /* NOT forced binary, convert to ASCII */ convert_to_network(postdata, strlen(postdata)); if(subletter != 'b') { /* NOT forced binary, convert to ASCII */ if(convert_to_network(postdata, strlen(postdata))) { Curl_safefree(postdata); return PARAM_NO_MEM; } } #endif Loading @@ -1032,6 +1037,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ curl_off_t newlen = oldlen + size + 2; config->postfields = malloc((size_t)newlen); if(!config->postfields) { Curl_safefree(oldpost); Curl_safefree(postdata); return PARAM_NO_MEM; } Loading @@ -1053,8 +1059,10 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ We can't set the request type here, as this data might be used in a simple GET if -G is used. Already or soon. if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq)) if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq)) { Curl_safefree(postdata); return PARAM_BAD_USE; } */ break; case 'D': Loading src/tool_operhlp.c +2 −1 Original line number Diff line number Diff line Loading @@ -132,6 +132,7 @@ char *add_file_name_to_url(CURL *curl, char *url, const char *filename) if(encfile) { char *urlbuffer = malloc(strlen(url) + strlen(encfile) + 3); if(!urlbuffer) { curl_free(encfile); Curl_safefree(url); return NULL; } Loading @@ -143,8 +144,8 @@ char *add_file_name_to_url(CURL *curl, char *url, const char *filename) sprintf(urlbuffer, "%s/%s", url, encfile); curl_free(encfile); Curl_safefree(url); url = urlbuffer; /* use our new URL instead! */ } } Loading Loading
src/tool_getparam.c +13 −5 Original line number Diff line number Diff line Loading @@ -936,6 +936,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ } else { GetStr(&postdata, p); if(postdata) size = strlen(postdata); } Loading Loading @@ -1019,8 +1020,12 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ } #ifdef CURL_DOES_CONVERSIONS if(subletter != 'b') { /* NOT forced binary, convert to ASCII */ convert_to_network(postdata, strlen(postdata)); if(subletter != 'b') { /* NOT forced binary, convert to ASCII */ if(convert_to_network(postdata, strlen(postdata))) { Curl_safefree(postdata); return PARAM_NO_MEM; } } #endif Loading @@ -1032,6 +1037,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ curl_off_t newlen = oldlen + size + 2; config->postfields = malloc((size_t)newlen); if(!config->postfields) { Curl_safefree(oldpost); Curl_safefree(postdata); return PARAM_NO_MEM; } Loading @@ -1053,8 +1059,10 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ We can't set the request type here, as this data might be used in a simple GET if -G is used. Already or soon. if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq)) if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq)) { Curl_safefree(postdata); return PARAM_BAD_USE; } */ break; case 'D': Loading
src/tool_operhlp.c +2 −1 Original line number Diff line number Diff line Loading @@ -132,6 +132,7 @@ char *add_file_name_to_url(CURL *curl, char *url, const char *filename) if(encfile) { char *urlbuffer = malloc(strlen(url) + strlen(encfile) + 3); if(!urlbuffer) { curl_free(encfile); Curl_safefree(url); return NULL; } Loading @@ -143,8 +144,8 @@ char *add_file_name_to_url(CURL *curl, char *url, const char *filename) sprintf(urlbuffer, "%s/%s", url, encfile); curl_free(encfile); Curl_safefree(url); url = urlbuffer; /* use our new URL instead! */ } } Loading