[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Rich Salz rsalz at openssl.org
Tue Apr 11 16:20:36 UTC 2017


The branch OpenSSL_1_0_2-stable has been updated
       via  71d66c46c725a88a8d14b747610656e15610109e (commit)
      from  a91bfe2f55892f625d5a30171efa0fdfd2814abe (commit)


- Log -----------------------------------------------------------------
commit 71d66c46c725a88a8d14b747610656e15610109e
Author: Rich Salz <rsalz at openssl.org>
Date:   Tue Apr 11 12:17:54 2017 -0400

    Additional check to handle BAD SSL_write retry
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3122)

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

Summary of changes:
 ssl/s3_pkt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 39cdbaf..0290c99 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -670,7 +670,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
      * promptly send beyond the end of the users buffer ... so we trap and
      * report the error in a way the user will notice
      */
-    if (len < tot) {
+    if ((len < tot) || ((wb->left != 0) && (len < (tot + s->s3->wpend_tot)))) {
         SSLerr(SSL_F_SSL3_WRITE_BYTES, SSL_R_BAD_LENGTH);
         return (-1);
     }


More information about the openssl-commits mailing list