summaryrefslogtreecommitdiff
path: root/lib/http_digest.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-24 11:54:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-24 11:54:11 +0000
commitfeb2dd283533f842c9b6e4cc2fcc7fd35638d5a0 (patch)
treef0ecc2bd74917e67e3e9853e04a6ca16c2770eb3 /lib/http_digest.c
parent5e34f3dc0133333fb398dd4b285a63f58aa441da (diff)
downloadcurl-feb2dd283533f842c9b6e4cc2fcc7fd35638d5a0.tar.gz
Replaced all uses of sprintf() with the safer snprintf(). It is just a
precaution to prevent mistakes to lead to buffer overflows.
Diffstat (limited to 'lib/http_digest.c')
-rw-r--r--lib/http_digest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http_digest.c b/lib/http_digest.c
index b98af6803..d06453e8a 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -201,7 +201,7 @@ static void md5_to_ascii(unsigned char *source, /* 16 bytes */
{
int i;
for(i=0; i<16; i++)
- sprintf((char *)&dest[i*2], "%02x", source[i]);
+ snprintf((char *)&dest[i*2], 3, "%02x", source[i]);
}
CURLcode Curl_output_digest(struct connectdata *conn,