diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2010-05-15 00:36:40 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2010-05-15 00:36:40 +0000 |
commit | a7949b8da3da3b4c4fc005d92e1ab933c0f162f1 (patch) | |
tree | 1537812fe464274924b5c21fe69f2f77b8c3424a /crypto/err | |
parent | b0b4adc3af1d7d07634647526c879fc1908273f2 (diff) |
PR: 2253
Submitted By: Ger Hobbelt <ger@hobbelt.com>
Check callback return value when outputting errors.
Diffstat (limited to 'crypto/err')
-rw-r--r-- | crypto/err/err_prn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/err/err_prn.c b/crypto/err/err_prn.c index c298e16164..1e46f93ecf 100644 --- 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 */ } } |