mirror of
https://github.com/curl/curl.git
synced 2026-08-26 12:43:34 +03:00
sprintf() => snprintf()
This commit is contained in:
parent
b2e47dfde4
commit
751d503f54
2 changed files with 5 additions and 3 deletions
|
|
@ -55,6 +55,7 @@
|
|||
#include "urldata.h"
|
||||
#include "sendf.h"
|
||||
|
||||
#define _MPRINTF_REPLACE /* use the internal *printf() functions */
|
||||
#include <curl/mprintf.h>
|
||||
|
||||
#ifdef KRB4
|
||||
|
|
@ -87,7 +88,7 @@ void failf(struct UrlData *data, char *fmt, ...)
|
|||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
if(data->errorbuffer)
|
||||
vsprintf(data->errorbuffer, fmt, ap);
|
||||
vsnprintf(data->errorbuffer, CURL_ERROR_SIZE, fmt, ap);
|
||||
else /* no errorbuffer receives this, write to data->err instead */
|
||||
vfprintf(data->err, fmt, ap);
|
||||
va_end(ap);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue