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:
b0b4adc
)
PR: 2253
author
Dr. Stephen Henson
<steve@openssl.org>
Sat, 15 May 2010 00:36:40 +0000
(
00:36
+0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Sat, 15 May 2010 00:36:40 +0000
(
00:36
+0000)
Submitted By: Ger Hobbelt <ger@hobbelt.com>
Check callback return value when outputting errors.
crypto/err/err_prn.c
patch
|
blob
|
history
diff --git
a/crypto/err/err_prn.c
b/crypto/err/err_prn.c
index c298e161644eea0dbe798e42b4398e4f50a7a153..1e46f93ecf8136bd0f260d74aed0f1acc73cd530 100644
(file)
--- a/
crypto/err/err_prn.c
+++ b/
crypto/err/err_prn.c
@@
-79,7
+79,8
@@
void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
ERR_error_string_n(l, buf, sizeof buf);
BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
file, line, (flags & ERR_TXT_STRING) ? data : "");
- cb(buf2, strlen(buf2), u);
+ if (cb(buf2, strlen(buf2), u) <= 0)
+ break; /* abort outputting the error report */
}
}