diff options
author | Rich Salz <rsalz@akamai.com> | 2016-02-17 16:13:49 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-22 11:27:02 -0500 |
commit | 985c3146967633707f7c165df82bb0fd8f279758 (patch) | |
tree | 9176effe1e177375a42b779d79dd768f95a47473 /crypto/pem | |
parent | ed233db7421b98b2058da2a07f6c46b52917b918 (diff) | |
download | openssl-985c3146967633707f7c165df82bb0fd8f279758.tar.gz |
RT4320/GH705: Fix PEM parsing bug.
Also removing confusing pointer-alias variable.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pem_lib.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index a75d9acf03..e31ea03da6 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -489,7 +489,6 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) { const EVP_CIPHER *enc = NULL; char *dekinfostart, c; - char **header_pp = &header; cipher->cipher = NULL; if ((header == NULL) || (*header == '\0') || (*header == '\n')) @@ -536,13 +535,13 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) } *header = '\0'; cipher->cipher = enc = EVP_get_cipherbyname(dekinfostart); - *header = c; + *header++ = c; if (enc == NULL) { PEMerr(PEM_F_PEM_GET_EVP_CIPHER_INFO, PEM_R_UNSUPPORTED_ENCRYPTION); return (0); } - if (!load_iv(header_pp, &(cipher->iv[0]), EVP_CIPHER_iv_length(enc))) + if (!load_iv(&header, cipher->iv, EVP_CIPHER_iv_length(enc))) return (0); return (1); |