[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Tue May 24 14:51:28 UTC 2016


The branch master has been updated
       via  c01a3c6df038d4cbec87ae658c25b3730c5af88c (commit)
      from  e0a675e211302257256ed80ea1edeff329c9b9e9 (commit)


- Log -----------------------------------------------------------------
commit c01a3c6df038d4cbec87ae658c25b3730c5af88c
Author: Todd Short <tshort at akamai.com>
Date:   Tue May 24 09:03:25 2016 -0400

    Fix braces in e_aes.c: aes_init_key
    
    This compiles correctly, but depending on what may be defined, it's
    possible that this could fail compilation. The braces are mismatched,
    and it's possible to end up with an else followed by another else.
    
    This presumes the indentation is mostly correct and indicative of
    intent. Found via static analysis.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1118)

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

Summary of changes:
 crypto/evp/e_aes.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c
index ae39992..cfa65b8 100644
--- a/crypto/evp/e_aes.c
+++ b/crypto/evp/e_aes.c
@@ -1027,7 +1027,7 @@ static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
 
     mode = EVP_CIPHER_CTX_mode(ctx);
     if ((mode == EVP_CIPH_ECB_MODE || mode == EVP_CIPH_CBC_MODE)
-        && !enc)
+        && !enc) {
 #ifdef HWAES_CAPABLE
         if (HWAES_CAPABLE) {
             ret = HWAES_set_decrypt_key(key,
@@ -1066,6 +1066,7 @@ static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
             dat->block = (block128_f) AES_decrypt;
             dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
                 (cbc128_f) AES_cbc_encrypt : NULL;
+        }
     } else
 #ifdef HWAES_CAPABLE
     if (HWAES_CAPABLE) {


More information about the openssl-commits mailing list