[openssl] OpenSSL_1_1_1-stable update

tomas at openssl.org tomas at openssl.org
Wed Jan 5 09:05:12 UTC 2022


The branch OpenSSL_1_1_1-stable has been updated
       via  52d9a1d0448432182a5fab0753c236b29819a2a5 (commit)
      from  dd05385e36582f34e691b1350dd7daf74df5cc90 (commit)


- Log -----------------------------------------------------------------
commit 52d9a1d0448432182a5fab0753c236b29819a2a5
Author: Tomas Mraz <tomas at openssl.org>
Date:   Tue Dec 28 13:32:57 2021 +0100

    close_console: Always unlock as the lock is always held
    
    Fixes #17364
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17395)

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

Summary of changes:
 crypto/ui/ui_openssl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c
index 9526c16536..eab29e288d 100644
--- a/crypto/ui/ui_openssl.c
+++ b/crypto/ui/ui_openssl.c
@@ -572,6 +572,8 @@ static int echo_console(UI *ui)
 
 static int close_console(UI *ui)
 {
+    int ret = 1;
+
     if (tty_in != stdin)
         fclose(tty_in);
     if (tty_out != stderr)
@@ -584,12 +586,12 @@ static int close_console(UI *ui)
         BIO_snprintf(tmp_num, sizeof(tmp_num) - 1, "%%X%08X", status);
         UIerr(UI_F_CLOSE_CONSOLE, UI_R_SYSDASSGN_ERROR);
         ERR_add_error_data(2, "status=", tmp_num);
-        return 0;
+        ret = 0;
     }
 # endif
     CRYPTO_THREAD_unlock(ui->lock);
 
-    return 1;
+    return ret;
 }
 
 # if !defined(OPENSSL_SYS_WINCE)


More information about the openssl-commits mailing list