Commit 5971d32cfb for openssl.org

commit 5971d32cfbf6ee34b0b4681ed693baddfe3573b4
Author: Neil Horman <nhorman@openssl.org>
Date:   Mon Feb 23 15:08:22 2026 -0500

    Remove dead code in ossl_ech_copy_inner2outer

    Theres an additional NULL check in this function that can never be NULL
    at the point at which it is checked.  Remove it

    Fixes https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1681461

    Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
    Reviewed-by: Tomas Mraz <tomas@openssl.org>
    Reviewed-by: Matt Caswell <matt@openssl.org>
    MergeDate: Wed Feb 25 15:32:54 2026
    (Merged from https://github.com/openssl/openssl/pull/30147)

diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c
index 9dba2d7446..bbe622899d 100644
--- a/ssl/statem/extensions.c
+++ b/ssl/statem/extensions.c
@@ -503,13 +503,10 @@ int ossl_ech_copy_inner2outer(SSL_CONNECTION *s, uint16_t ext_type,
             ext_type);
     }
     OSSL_TRACE_END(TLS);
+
     /*
-     * This one wasn't in inner, so re-do processing. We don't
-     * actually do this currently, but could.
+     * copy inner value to outer
      */
-    if (myext == NULL)
-        return OSSL_ECH_SAME_EXT_CONTINUE;
-    /* copy inner value to outer */
     if (PACKET_data(&myext->data) != NULL
         && PACKET_remaining(&myext->data) > 0) {
         if (!WPACKET_put_bytes_u16(pkt, ext_type)