[openssl] master update

Richard Levitte levitte at openssl.org
Tue Nov 24 11:11:20 UTC 2020


The branch master has been updated
       via  223652548d295650ad2dfc7052a0b4abd94c65ae (commit)
      from  c150a9485772bd4b1bdf144c9fa26043a8a24d65 (commit)


- Log -----------------------------------------------------------------
commit 223652548d295650ad2dfc7052a0b4abd94c65ae
Author: Petr Gotthard <petr.gotthard at advantech-bb.cz>
Date:   Sun Nov 22 17:50:53 2020 +0100

    Fix double-free in decoder_pkey.c
    
    Fix for the issue #13472. The decoderctx has to be initialized in every
    cycle as its constructor may not be called due to lazy evaluation of
    the if-condition.
    
    CLA: trivial
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13473)

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

Summary of changes:
 crypto/encode_decode/decoder_pkey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/encode_decode/decoder_pkey.c b/crypto/encode_decode/decoder_pkey.c
index 3a765c5986..016d6047bd 100644
--- a/crypto/encode_decode/decoder_pkey.c
+++ b/crypto/encode_decode/decoder_pkey.c
@@ -267,7 +267,6 @@ static void collect_decoder(OSSL_DECODER *decoder, void *arg)
     size_t i, end_i;
     const OSSL_PROVIDER *prov = OSSL_DECODER_provider(decoder);
     void *provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
-    void *decoderctx = NULL;
 
     if (data->error_occured)
         return;
@@ -279,6 +278,7 @@ static void collect_decoder(OSSL_DECODER *decoder, void *arg)
     end_i = sk_OPENSSL_CSTRING_num(data->names);
     for (i = 0; i < end_i; i++) {
         const char *name = sk_OPENSSL_CSTRING_value(data->names, i);
+        void *decoderctx = NULL;
         OSSL_DECODER_INSTANCE *di = NULL;
 
         if (OSSL_DECODER_is_a(decoder, name)


More information about the openssl-commits mailing list