[openssl-commits] [openssl] master update

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Fri Feb 9 18:53:06 UTC 2018


The branch master has been updated
       via  ebc20cfa746cb7dec91aff1e241063d785644fe3 (commit)
      from  c423ecaa7f6d0cc77c4f121c6de7d585439bca8f (commit)


- Log -----------------------------------------------------------------
commit ebc20cfa746cb7dec91aff1e241063d785644fe3
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Fri Feb 9 17:19:50 2018 +0100

    Swap the check in ssl3_write_pending to avoid using
    the possibly indeterminate pointer value in wpend_buf.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5305)

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

Summary of changes:
 ssl/record/rec_layer_s3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c
index 24e260e..fbb7461 100644
--- a/ssl/record/rec_layer_s3.c
+++ b/ssl/record/rec_layer_s3.c
@@ -1115,8 +1115,8 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, size_t len,
     size_t tmpwrit = 0;
 
     if ((s->rlayer.wpend_tot > len)
-        || ((s->rlayer.wpend_buf != buf) &&
-            !(s->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER))
+        || (!(s->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER)
+            && (s->rlayer.wpend_buf != buf))
         || (s->rlayer.wpend_type != type)) {
         SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL3_WRITE_PENDING,
                  SSL_R_BAD_WRITE_RETRY);


More information about the openssl-commits mailing list