]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove dead code in ossl_ech_copy_inner2outer
authorNeil Horman <nhorman@openssl.org>
Mon, 23 Feb 2026 20:08:22 +0000 (15:08 -0500)
committerNeil Horman <nhorman@openssl.org>
Wed, 25 Feb 2026 15:32:51 +0000 (10:32 -0500)
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)

ssl/statem/extensions.c

index 9dba2d744603baf6195f6f5163d380eecfa3dc9e..bbe622899da6cec4db8d9d72afbd0e3f0d0c2c15 100644 (file)
@@ -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)