check return value of BIO_write in PKCS7_decrypt
This commit is contained in:
parent
e7f8ff4382
commit
34b61f5a25
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue