1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-11 07:39:50 -04:00

use snprintf() to be on the safe side

This commit is contained in:
Daniel Stenberg 2004-06-24 10:43:22 +00:00
parent 00ee738fdd
commit 0031d76f2a

View File

@ -144,7 +144,7 @@ static CURLcode Curl_output_basic(struct connectdata *conn, bool proxy)
pwd = conn->passwd;
}
sprintf(data->state.buffer, "%s:%s", user, pwd);
snprintf(data->state.buffer, sizeof(data->state.buffer), "%s:%s", user, pwd);
if(Curl_base64_encode(data->state.buffer,
strlen(data->state.buffer),
&authorization) > 0) {