QUIC QLOG: Fix use of sprintf

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23744)
This commit is contained in:
Hugo Landau 2024-03-04 22:55:51 +00:00
parent e98940d6f6
commit 6a11cd50d5

View File

@ -130,7 +130,7 @@ QLOG *ossl_qlog_new_from_env(const QLOG_TRACE_INFO *info)
filename[l++] = qlogdir_sep;
for (i = 0; i < info->odcid.id_len; ++i)
l += sprintf(filename + l, "%02x", info->odcid.id[i]);
l += BIO_snprintf(filename + l, strl - l, "%02x", info->odcid.id[i]);
l += BIO_snprintf(filename + l, strl - l, "_%s.sqlog",
info->is_server ? "server" : "client");