提交 beedea2f 编写于 作者: D Dr. Stephen Henson

Free up BIO properly when using streaming S/MIME sign.

上级 34be34fd
......@@ -239,14 +239,13 @@ static int pkcs7_output_data(BIO *out, BIO *data, PKCS7 *p7, int flags)
/* Finalize signatures */
PKCS7_dataFinal(p7, p7bio);
/* Now remove any digests from output BIO */
/* Now remove any digests prepended to the BIO */
while (1)
while (p7bio != out)
{
tmpbio = BIO_pop(p7bio);
if (tmpbio == out)
break;
BIO_free(tmpbio);
BIO_free(p7bio);
p7bio = tmpbio;
}
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册