[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Sat Feb 13 13:21:34 UTC 2016


The branch master has been updated
       via  33a6d5a0e565e08758bcb6af456ec657c3a7a76a (commit)
      from  5b326dc529e19194feaef9a65fa37efbe11eaa7e (commit)


- Log -----------------------------------------------------------------
commit 33a6d5a0e565e08758bcb6af456ec657c3a7a76a
Author: Dmitry-Me <wipedout at yandex.ru>
Date:   Wed Feb 10 09:37:52 2016 +0300

    GH643: Cleanup header analysis
    
    Signed-off-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Kurt Roeckx <kurt at openssl.org>

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

Summary of changes:
 crypto/pem/pem_lib.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c
index eb03acc..a75d9ac 100644
--- a/crypto/pem/pem_lib.c
+++ b/crypto/pem/pem_lib.c
@@ -488,7 +488,7 @@ int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen,
 int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
 {
     const EVP_CIPHER *enc = NULL;
-    char *p, c;
+    char *dekinfostart, c;
     char **header_pp = &header;
 
     cipher->cipher = NULL;
@@ -521,7 +521,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
     }
     header += 10;
 
-    p = header;
+    dekinfostart = header;
     for (;;) {
         c = *header;
 #ifndef CHARSET_EBCDIC
@@ -535,9 +535,8 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
         header++;
     }
     *header = '\0';
-    cipher->cipher = enc = EVP_get_cipherbyname(p);
+    cipher->cipher = enc = EVP_get_cipherbyname(dekinfostart);
     *header = c;
-    header++;
 
     if (enc == NULL) {
         PEMerr(PEM_F_PEM_GET_EVP_CIPHER_INFO, PEM_R_UNSUPPORTED_ENCRYPTION);


More information about the openssl-commits mailing list