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

Dr. Stephen Henson steve at openssl.org
Tue Jul 26 16:22:06 UTC 2016


The branch OpenSSL_1_0_2-stable has been updated
       via  97a7b2ebd97fcacbf354de22496f4d19eb81e515 (commit)
      from  325da8231c8d441e6bb7f15d1a5a23ff63c842e5 (commit)


- Log -----------------------------------------------------------------
commit 97a7b2ebd97fcacbf354de22496f4d19eb81e515
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Tue Jul 26 16:51:49 2016 +0100

    Set error if EVP_CipherUpdate fails.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit ee6ce5cc368574c0b0b470e61ee2f82a0efadbb7)
    
    Conflicts:
    	crypto/evp/bio_enc.c

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

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

diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c
index 363e024..590f236 100644
--- a/crypto/evp/bio_enc.c
+++ b/crypto/evp/bio_enc.c
@@ -201,9 +201,14 @@ static int enc_read(BIO *b, char *out, int outl)
                 break;
             }
         } else {
-            EVP_CipherUpdate(&(ctx->cipher),
-                             (unsigned char *)ctx->buf, &ctx->buf_len,
-                             (unsigned char *)&(ctx->buf[BUF_OFFSET]), i);
+            if (!EVP_CipherUpdate(&ctx->cipher,
+                                  (unsigned char *)ctx->buf, &ctx->buf_len,
+                                  (unsigned char *)&(ctx->buf[BUF_OFFSET]),
+                                  i)) {
+                BIO_clear_retry_flags(b);
+                ctx->ok = 0;
+                return 0;
+            }
             ctx->cont = 1;
             /*
              * Note: it is possible for EVP_CipherUpdate to decrypt zero


More information about the openssl-commits mailing list