diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-06-24 11:54:11 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-06-24 11:54:11 +0000 |
commit | feb2dd283533f842c9b6e4cc2fcc7fd35638d5a0 (patch) | |
tree | f0ecc2bd74917e67e3e9853e04a6ca16c2770eb3 /lib/ssluse.c | |
parent | 5e34f3dc0133333fb398dd4b285a63f58aa441da (diff) |
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/ssluse.c')
-rw-r--r-- | lib/ssluse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c index 6404f7ac0..aa7da18e3 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -1056,8 +1056,8 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type, msg_type = *(char*)buf; msg_name = ssl_msg_type(ssl_ver, msg_type); - txt_len = 1 + sprintf(ssl_buf, "SSLv%c, %s%s (%d):\n", - ver, tls_rt_name, msg_name, msg_type); + txt_len = 1 + snprintf(ssl_buf, sizeof(ssl_buf), "SSLv%c, %s%s (%d):\n", + ver, tls_rt_name, msg_name, msg_type); Curl_debug(data, CURLINFO_TEXT, ssl_buf, txt_len, NULL); Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT : |