PR: 2253
Submitted By: Ger Hobbelt <ger@hobbelt.com> Check callback return value when outputting errors.
This commit is contained in:
parent
ff656346fa
commit
dc4e1ddc9f
1 changed files with 2 additions and 1 deletions
|
@ -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 */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue