{
va_list arg;
CURLcode ret;
- char buffer[128];
+ char *bufp;
char value[256];
bool remark=FALSE;
ret = curl_easy_setopt(curl, tag, oval);
}
- sprintf(buffer, "%scurl_easy_setopt(hnd, %s, %s);%s",
- remark?"/* ":"",
- name, value,
- remark?" [REMARK] */":"");
-
- easycode = curl_slist_append(easycode, buffer);
+ bufp = curl_maprintf("%scurl_easy_setopt(hnd, %s, %s);%s",
+ remark?"/* ":"", name, value,
+ remark?" [REMARK] */":"");
+ easycode = curl_slist_append(easycode, bufp);
+ curl_free(bufp);
va_end(arg);
return ret;