[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Wed Mar 21 09:46:03 UTC 2018


The branch master has been updated
       via  696de86f8edefdf885a665ed9166ee2432f2ee30 (commit)
      from  9d9dc6ac852a74836ba15a3ed10b3ecb6581fd1b (commit)


- Log -----------------------------------------------------------------
commit 696de86f8edefdf885a665ed9166ee2432f2ee30
Author: Peter Wu <peter at lekensteyn.nl>
Date:   Tue Mar 20 23:47:06 2018 +0100

    Fix stack-use-after-scope
    
    Fixes regression from #5667.
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    Reviewed-by: Ben Kaduk <kaduk at mit.edu>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5701)

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

Summary of changes:
 ssl/statem/extensions_clnt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ssl/statem/extensions_clnt.c b/ssl/statem/extensions_clnt.c
index bebf73a..5c36004 100644
--- a/ssl/statem/extensions_clnt.c
+++ b/ssl/statem/extensions_clnt.c
@@ -744,6 +744,9 @@ EXT_RETURN tls_construct_ctos_early_data(SSL *s, WPACKET *pkt,
                                          unsigned int context, X509 *x,
                                          size_t chainidx)
 {
+#ifndef OPENSSL_NO_PSK
+    char identity[PSK_MAX_IDENTITY_LEN + 1];
+#endif  /* OPENSSL_NO_PSK */
     const unsigned char *id = NULL;
     size_t idlen = 0;
     SSL_SESSION *psksess = NULL;
@@ -765,7 +768,6 @@ EXT_RETURN tls_construct_ctos_early_data(SSL *s, WPACKET *pkt,
 
 #ifndef OPENSSL_NO_PSK
     if (psksess == NULL && s->psk_client_callback != NULL) {
-        char identity[PSK_MAX_IDENTITY_LEN + 1];
         unsigned char psk[PSK_MAX_PSK_LEN];
         size_t psklen = 0;
 


More information about the openssl-commits mailing list