From: Dr. Stephen Henson Date: Sat, 15 May 2010 00:36:40 +0000 (+0000) Subject: PR: 2253 X-Git-Tag: OpenSSL_0_9_8o~14 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a7949b8da3da3b4c4fc005d92e1ab933c0f162f1;p=oweals%2Fopenssl.git PR: 2253 Submitted By: Ger Hobbelt Check callback return value when outputting errors. --- 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 */ } }