From 7015be7e487c936fda9b4981ba162c0cc1b837de Mon Sep 17 00:00:00 2001 From: jsing <> Date: Tue, 7 Feb 2017 15:52:33 +0000 Subject: Revert previous; the implementation is incorrect since it assumes that the provided error code matches the error that is currently on the top of the error stack. --- src/lib/libcrypto/err/err_prn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/err/err_prn.c') diff --git a/src/lib/libcrypto/err/err_prn.c b/src/lib/libcrypto/err/err_prn.c index 6a3062a89a..48166829d4 100644 --- a/src/lib/libcrypto/err/err_prn.c +++ b/src/lib/libcrypto/err/err_prn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: err_prn.c,v 1.17 2017/02/07 03:11:11 beck Exp $ */ +/* $OpenBSD: err_prn.c,v 1.18 2017/02/07 15:52:33 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -80,8 +80,8 @@ ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u) while ((l = ERR_get_error_line_data(&file, &line, &data, &flags)) != 0) { ERR_error_string_n(l, buf, sizeof buf); - (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s\n", es, - buf, (flags & ERR_TXT_STRING) ? data : ""); + (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, + buf, file, line, (flags & ERR_TXT_STRING) ? data : ""); if (cb(buf2, strlen(buf2), u) <= 0) break; /* abort outputting the error report */ } -- cgit v1.2.3-55-g6feb