Minor fixes
authorHugo Landau <hlandau@openssl.org>
Mon, 29 Jan 2024 15:00:33 +0000 (15:00 +0000)
committerHugo Landau <hlandau@openssl.org>
Fri, 2 Feb 2024 11:50:30 +0000 (11:50 +0000)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037)

ssl/quic/json_enc.c
ssl/quic/qlog.c
ssl/quic/qlog_event_helpers.c

index 302479a5d5a329b71db235244efd47e84cd18f33..da698c2222bcf514c040bf241babf14f78f99607 100644 (file)
@@ -603,7 +603,7 @@ void ossl_json_f64(OSSL_JSON_ENC *json, double value)
         return;
     }
 
-    snprintf(buf, sizeof(buf), "%1.17g", value);
+    BIO_snprintf(buf, sizeof(buf), "%1.17g", value);
     json_write_str(json, buf);
     json_post_item(json);
 }
index 7299d695153bb48576b3aacf7a07e8359bce8d50..1d07b6f6295bb579abdb4a315526ab4f59ca2341 100644 (file)
@@ -335,9 +335,9 @@ static void qlog_event_seq_header(QLOG *qlog)
                 if (qlog->info.override_impl_name != NULL) {
                     p = qlog->info.override_impl_name;
                 } else {
-                    snprintf(buf, sizeof(buf), "OpenSSL/%s (%s)",
-                             OpenSSL_version(OPENSSL_FULL_VERSION_STRING),
-                             OpenSSL_version(OPENSSL_PLATFORM) + 10);
+                    BIO_snprintf(buf, sizeof(buf), "OpenSSL/%s (%s)",
+                                 OpenSSL_version(OPENSSL_FULL_VERSION_STRING),
+                                 OpenSSL_version(OPENSSL_PLATFORM) + 10);
                 }
 
                 ossl_json_key(&qlog->json, "type");
index 6a726029904ef03f92a0002595f972f6e7ab0310..997bf7603ac737678f001eb14abaa0ae81fff7db 100644 (file)
@@ -130,8 +130,8 @@ void ossl_qlog_event_connectivity_connection_closed(QLOG *qlog,
 
             if (tcause->error_code >= QUIC_ERR_CRYPTO_ERR_BEGIN
                 && tcause->error_code <= QUIC_ERR_CRYPTO_ERR_END) {
-                snprintf(ce, sizeof(ce), "crypto_error_0x%03llx",
-                         (unsigned long long)tcause->error_code);
+                BIO_snprintf(ce, sizeof(ce), "crypto_error_0x%03llx",
+                             (unsigned long long)tcause->error_code);
                 m = ce;
             }
             /* TODO(QLOG FUTURE): Consider adding ERR information in the output. */