From feb2dd283533f842c9b6e4cc2fcc7fd35638d5a0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 24 Jun 2004 11:54:11 +0000 Subject: Replaced all uses of sprintf() with the safer snprintf(). It is just a precaution to prevent mistakes to lead to buffer overflows. --- lib/http_digest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/http_digest.c') 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, -- cgit v1.2.1