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

Dr. Stephen Henson steve at openssl.org
Tue Jul 26 21:49:22 UTC 2016


The branch OpenSSL_1_0_2-stable has been updated
       via  68bc6b7a36be4b635adb8d6ac0c849c51dcd8543 (commit)
      from  97a7b2ebd97fcacbf354de22496f4d19eb81e515 (commit)


- Log -----------------------------------------------------------------
commit 68bc6b7a36be4b635adb8d6ac0c849c51dcd8543
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Tue Jul 26 20:22:49 2016 +0100

    Note cipher BIO write errors too.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit 976ef6adcc157233fb641ca99e2424630ef1814f)
    
    Conflicts:
    	crypto/evp/bio_enc.c

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

Summary of changes:
 crypto/evp/bio_enc.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c
index 590f236..0806f23 100644
--- a/crypto/evp/bio_enc.c
+++ b/crypto/evp/bio_enc.c
@@ -265,9 +265,13 @@ static int enc_write(BIO *b, const char *in, int inl)
     ctx->buf_off = 0;
     while (inl > 0) {
         n = (inl > ENC_BLOCK_SIZE) ? ENC_BLOCK_SIZE : inl;
-        EVP_CipherUpdate(&(ctx->cipher),
-                         (unsigned char *)ctx->buf, &ctx->buf_len,
-                         (unsigned char *)in, n);
+        if (!EVP_CipherUpdate(&ctx->cipher,
+                              (unsigned char *)ctx->buf, &ctx->buf_len,
+                              (unsigned char *)in, n)) {
+            BIO_clear_retry_flags(b);
+            ctx->ok = 0;
+            return 0;
+        }
         inl -= n;
         in += n;
 


More information about the openssl-commits mailing list