网上一个上传文件到http协议服务器//二星参数使用有关问题

网上一个上传文件到http协议服务器//二星参数使用问题
memset(*response,0,len); //二星的参数,就三个地方使用了 我用个一星不也能拷贝地址内容吗?
memcpy(*response,ptmp,len-1);
if(atoi(h_post)<len)
(*response)[atoi(h_post)] = '\0';

int http_upload(http_tcpclient *pclient,char *page, char *filename, char **response)
{
int fd;
char *lpbuf, *ptmp, *fbuf;
int len, nSize;
char h_post[128], h_host[128], h_content_len[128], h_content_type[256], h_content_str[1024];

const char *h_header="User-Agent: Mozilla/4.0\r\nCache-Control: no-cache\r\nAccept: */*\r\nAccept-Language: zh-cn\r\nConnection: Keep-Alive\r\n";
const char *h_data_boun="---------------------------7d9ab1c50098";

//开始组包;
memset(h_post, 0, sizeof(h_post));
sprintf(h_post, "POST %s HTTP/1.1\r\n", page);
memset(h_host, 0, sizeof(h_host));
sprintf(h_host, "HOST: %s:%d\r\n",pclient->remote_ip, pclient->remote_port);
memset(h_content_type, 0, sizeof(h_content_type));
sprintf(h_content_type, "Content-Type: multipart/form-data; boundary=%s\r\n", h_data_boun);

memset(h_content_str, 0, sizeof(h_content_str));
snprintf(h_content_str, 1023, "--%s\r\nContent-Disposition: form-data; name=\"fileName\"; filename=\"%s\"\r\n\r\n", h_data_boun, filename);
//开始读取文件内容
if (filename == NULL || (fd = open(filename, O_RDONLY)) == -1) {
return -6;
}
nSize = lseek(fd, 0, SEEK_END);
if (nSize == -1) return -2;
lseek(fd, (off_t)0, SEEK_SET);
fbuf = (char *)calloc(nSize + 1, sizeof(char));
if (NULL == fbuf){
return -7;
}
if (read(fd, fbuf, nSize) == -1) return -8;
fbuf[nSize] = 0;

memset(h_content_len, 0, sizeof(h_content_len));
sprintf(h_content_len,"Content-Length: %d\r\n\r\n", strlen(h_content_str)+nSize+strlen(h_data_boun)+6);
len = strlen(h_post)+strlen(h_host)+strlen(h_header)+strlen(h_content_len)+strlen(h_content_type)+nSize+strlen(h_data_boun)+6+1;
lpbuf = (char*)malloc(len);
if(lpbuf==NULL){
printf("Malloc error.\n");
return -1;
}
strcpy(lpbuf,h_post);
strcat(lpbuf,h_host);
strcat(lpbuf,h_header);
strcat(lpbuf,h_content_type);
strcat(lpbuf,h_content_len);
strcat(lpbuf,"\r\n");
strcat(lpbuf,h_content_str);
strcat(lpbuf,fbuf);
strcat(lpbuf,"\r\n");
memset(h_content_str, 0, sizeof(h_content_str));
sprintf(h_content_str, "--%s--", h_data_boun);