projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82687bb
)
Prevent ERR_print_errors_fp crash on Win32 [from HEAD].
author
Andy Polyakov
<appro@openssl.org>
Tue, 20 Apr 2010 20:28:30 +0000
(20:28 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Tue, 20 Apr 2010 20:28:30 +0000
(20:28 +0000)
crypto/err/err_prn.c
patch
|
blob
|
history
diff --git
a/crypto/err/err_prn.c
b/crypto/err/err_prn.c
index 4cdf342fa634c2dbbe1df484eb831181e53fafab..c298e161644eea0dbe798e42b4398e4f50a7a153 100644
(file)
--- a/
crypto/err/err_prn.c
+++ b/
crypto/err/err_prn.c
@@
-86,7
+86,12
@@
void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
#ifndef OPENSSL_NO_FP_API
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)
{