diff options
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_decr.c')
-rw-r--r-- | src/lib/libcrypto/pkcs12/p12_decr.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c index ba77dbbe32..9d3557e8d7 100644 --- a/src/lib/libcrypto/pkcs12/p12_decr.c +++ b/src/lib/libcrypto/pkcs12/p12_decr.c | |||
@@ -89,7 +89,14 @@ unsigned char * PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass, | |||
89 | goto err; | 89 | goto err; |
90 | } | 90 | } |
91 | 91 | ||
92 | EVP_CipherUpdate(&ctx, out, &i, in, inlen); | 92 | if (!EVP_CipherUpdate(&ctx, out, &i, in, inlen)) |
93 | { | ||
94 | OPENSSL_free(out); | ||
95 | out = NULL; | ||
96 | PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,ERR_R_EVP_LIB); | ||
97 | goto err; | ||
98 | } | ||
99 | |||
93 | outlen = i; | 100 | outlen = i; |
94 | if(!EVP_CipherFinal_ex(&ctx, out + i, &i)) { | 101 | if(!EVP_CipherFinal_ex(&ctx, out + i, &i)) { |
95 | OPENSSL_free(out); | 102 | OPENSSL_free(out); |