diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2010-05-15 00:36:12 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2010-05-15 00:36:12 +0000 |
commit | dc4e1ddc9f445bf424afdd24a22e20b64f37938f (patch) | |
tree | 314289769f0dd21e16f21487cb5e101dfa2cb998 /crypto/err | |
parent | ff656346fa814acbf1a8127442c6bf7778a2868e (diff) | |
download | openssl-new-dc4e1ddc9f445bf424afdd24a22e20b64f37938f.tar.gz |
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 de32f332c4..a0168ac8ed 100644 --- a/crypto/err/err_prn.c +++ b/crypto/err/err_prn.c @@ -81,7 +81,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 */ } } |