[openssl] OpenSSL_1_1_1-stable update

tmraz at fedoraproject.org tmraz at fedoraproject.org
Tue Apr 14 09:57:47 UTC 2020


The branch OpenSSL_1_1_1-stable has been updated
       via  5f62ff49a9fdc9079aa6e9aefaf2cee51d2f4455 (commit)
      from  369cef760364a88aafa68afd406328e20689b5e2 (commit)


- Log -----------------------------------------------------------------
commit 5f62ff49a9fdc9079aa6e9aefaf2cee51d2f4455
Author: scott <scott.morgan at hibiscus-plc.com>
Date:   Thu Apr 9 12:36:37 2020 +0100

    BIO_do_accept: correct error return value
    
    `BIO_do_accept` was returning incorrect values when unable to bind to a port.
    
    Fixes #7717
    CLA: trivial
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/11505)
    
    (cherry picked from commit 0437435a960123be1ced766d18d715f939698345)

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

Summary of changes:
 crypto/bio/bss_acpt.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c
index b38e47a592..5a2cb50dfc 100644
--- a/crypto/bio/bss_acpt.c
+++ b/crypto/bio/bss_acpt.c
@@ -222,10 +222,10 @@ static int acpt_state(BIO *b, BIO_ACCEPT *c)
             break;
 
         case ACPT_S_CREATE_SOCKET:
-            ret = BIO_socket(BIO_ADDRINFO_family(c->addr_iter),
-                             BIO_ADDRINFO_socktype(c->addr_iter),
-                             BIO_ADDRINFO_protocol(c->addr_iter), 0);
-            if (ret == (int)INVALID_SOCKET) {
+            s = BIO_socket(BIO_ADDRINFO_family(c->addr_iter),
+                           BIO_ADDRINFO_socktype(c->addr_iter),
+                           BIO_ADDRINFO_protocol(c->addr_iter), 0);
+            if (s == (int)INVALID_SOCKET) {
                 SYSerr(SYS_F_SOCKET, get_last_socket_error());
                 ERR_add_error_data(4,
                                    "hostname=", c->param_addr,
@@ -233,9 +233,10 @@ static int acpt_state(BIO *b, BIO_ACCEPT *c)
                 BIOerr(BIO_F_ACPT_STATE, BIO_R_UNABLE_TO_CREATE_SOCKET);
                 goto exit_loop;
             }
-            c->accept_sock = ret;
-            b->num = ret;
+            c->accept_sock = s;
+            b->num = s;
             c->state = ACPT_S_LISTEN;
+            s = -1;
             break;
 
         case ACPT_S_LISTEN:


More information about the openssl-commits mailing list