check return value of BIO_write in PKCS7_decrypt
This commit is contained in:
parent
725713f74a
commit
25d5d15fd5
1 changed files with 5 additions and 1 deletions
|
@ -507,7 +507,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;
|
||||
|
|
Loading…
Reference in a new issue