check return value of BIO_write in PKCS7_decrypt
This commit is contained in:
parent
725713f74a
commit
25d5d15fd5
@ -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…
x
Reference in New Issue
Block a user