summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-10-12 08:22:16 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-10-12 08:22:16 +0000
commit751d503f54596d6d86f969683fec2fe296d9d1f0 (patch)
treeb3ad1a4a8264b6ba4bc92494fee5316dcd09eac3 /lib/url.c
parentb2e47dfde4a92a8365ff49e5a0b981dc3e05dab7 (diff)
downloadcurl-751d503f54596d6d86f969683fec2fe296d9d1f0.tar.gz
sprintf() => snprintf()
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 2cdb0c06e..c6f2606f7 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -917,7 +917,7 @@ CURLcode curl_connect(CURL *curl, CURLconnect **in_connect)
if(data->resume_from) {
if(!data->bits.set_range) {
/* if it already was in use, we just skip this */
- sprintf(resumerange, "%d-", data->resume_from);
+ snprintf(resumerange, sizeof(resumerange), "%d-", data->resume_from);
data->range=strdup(resumerange); /* tell ourselves to fetch this range */
data->bits.rangestringalloc = TRUE; /* mark as allocated */
data->bits.set_range = 1; /* switch on range usage */
@@ -1415,7 +1415,8 @@ CURLcode curl_connect(CURL *curl, CURLconnect **in_connect)
if(data->bits.proxy_user_passwd) {
char *authorization;
- sprintf(data->buffer, "%s:%s", data->proxyuser, data->proxypasswd);
+ snprintf(data->buffer, BUFSIZE, "%s:%s",
+ data->proxyuser, data->proxypasswd);
if(base64_encode(data->buffer, strlen(data->buffer),
&authorization) >= 0) {
data->ptr_proxyuserpwd =