aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pkcs7
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2015-09-06 12:56:33 +0200
committerRichard Levitte <levitte@openssl.org>2015-09-06 12:56:33 +0200
commit297172294c5bf2b94976ac6911d4d01176fb1921 (patch)
tree6c7be3985a35b27de84553774a5be869e80e4c0f /crypto/pkcs7
parentafc12d76f80d6ee14df3fc655e3c7e868ae0f368 (diff)
downloadopenssl-297172294c5bf2b94976ac6911d4d01176fb1921.tar.gz
Remove warning about use of uninitialised variable
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/pkcs7')
-rw-r--r--crypto/pkcs7/pk7_smime.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/pkcs7/pk7_smime.c b/crypto/pkcs7/pk7_smime.c
index 6522a51650..16df4eacd6 100644
--- a/crypto/pkcs7/pk7_smime.c
+++ b/crypto/pkcs7/pk7_smime.c
@@ -513,7 +513,7 @@ PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,
int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
{
BIO *tmpmem;
- int ret, i;
+ int ret = 0, i;
char *buf = NULL;
if (!p7) {
@@ -575,7 +575,6 @@ int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
break;
}
if (BIO_write(data, buf, i) != i) {
- ret = 0;
break;
}
}