The branch master has been updated
       via  ee8a61e158c42c327c3303101083422b9a7cc504 (commit)
      from  0088ef48c3e7d9c68e5b3c75cb077da601d22f37 (commit)


- Log -----------------------------------------------------------------
commit ee8a61e158c42c327c3303101083422b9a7cc504
Author: Matt Caswell <m...@openssl.org>
Date:   Wed Dec 29 13:42:58 2021 +0000

    Validate the category in OSSL_trace_end()
    
    OSSL_trace_end() should validate that the category it has been passed
    by the caler is valid, and return immediately if not.
    
    Fixes #17353
    
    Reviewed-by: Tomas Mraz <to...@openssl.org>
    Reviewed-by: Tim Hudson <t...@openssl.org>
    Reviewed-by: Matthias St. Pierre <matthias.st.pie...@ncp-e.com>
    Reviewed-by: Paul Dale <pa...@openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17371)

-----------------------------------------------------------------------

Summary of changes:
 crypto/trace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/crypto/trace.c b/crypto/trace.c
index f012b617ab..cc0b477698 100644
--- a/crypto/trace.c
+++ b/crypto/trace.c
@@ -496,6 +496,8 @@ void OSSL_trace_end(int category, BIO * channel)
     char *suffix = NULL;
 
     category = ossl_trace_get_category(category);
+    if (category < 0)
+        return;
     suffix = trace_channels[category].suffix;
     if (channel != NULL
         && ossl_assert(channel == current_channel)) {

Reply via email to