Prevent ERR_print_errors_fp crash on Win32 [from HEAD].
This commit is contained in:
parent
82687bb4c3
commit
b8febed96a
@ -86,7 +86,12 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
|
|||||||
#ifndef OPENSSL_NO_FP_API
|
#ifndef OPENSSL_NO_FP_API
|
||||||
static int print_fp(const char *str, size_t len, void *fp)
|
static int print_fp(const char *str, size_t len, void *fp)
|
||||||
{
|
{
|
||||||
return fwrite(str, 1, len, fp);
|
BIO bio;
|
||||||
|
|
||||||
|
BIO_set(&bio,BIO_s_file());
|
||||||
|
BIO_set_fp(&bio,fp,BIO_NOCLOSE);
|
||||||
|
|
||||||
|
return BIO_printf(&bio, "%s", str);
|
||||||
}
|
}
|
||||||
void ERR_print_errors_fp(FILE *fp)
|
void ERR_print_errors_fp(FILE *fp)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user