From 6a11cd50d52694353d7bb11421490939d92df1b6 Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Mon, 4 Mar 2024 22:55:51 +0000 Subject: [PATCH] QUIC QLOG: Fix use of sprintf Reviewed-by: Tim Hudson Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/23744) --- ssl/quic/qlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/quic/qlog.c b/ssl/quic/qlog.c index 2cfa9af9d3..c14d53eece 100644 --- a/ssl/quic/qlog.c +++ b/ssl/quic/qlog.c @@ -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");