check return value of BIO_write in PKCS7_decrypt

This commit is contained in:
Dr. Stephen Henson 2012-03-08 14:10:23 +00:00
parent e7f8ff4382
commit 34b61f5a25

View file

@ -594,7 +594,11 @@ int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
break;
}
BIO_write(data, buf, i);
if (BIO_write(data, buf, i) != i)
{
ret = 0;
break;
}
}
BIO_free_all(tmpmem);
return ret;