X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fpkcs12%2Fp12_decr.c;h=9d3557e8d7e03682eb9ed3b574f0da284a05149c;hb=cab6de03a2b721c89baffde254a4d3482f93c524;hp=ba77dbbe32c59c4ed9cff1ecabffea1f2d34e047;hpb=6343829a391df59e46e513c84b6264ee71ad9518;p=oweals%2Fopenssl.git diff --git a/crypto/pkcs12/p12_decr.c b/crypto/pkcs12/p12_decr.c index ba77dbbe32..9d3557e8d7 100644 --- a/crypto/pkcs12/p12_decr.c +++ b/crypto/pkcs12/p12_decr.c @@ -89,7 +89,14 @@ unsigned char * PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass, goto err; } - EVP_CipherUpdate(&ctx, out, &i, in, inlen); + if (!EVP_CipherUpdate(&ctx, out, &i, in, inlen)) + { + OPENSSL_free(out); + out = NULL; + PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,ERR_R_EVP_LIB); + goto err; + } + outlen = i; if(!EVP_CipherFinal_ex(&ctx, out + i, &i)) { OPENSSL_free(out);