File 1164-ssh-fix-kexinit-error-generation.patch of Package erlang
From 56fd31dd1ef6a515bcd1fc2423a485af76f0fd54 Mon Sep 17 00:00:00 2001
From: Jakub Witczak <kuba@erlang.org>
Date: Mon, 9 Jan 2023 12:59:33 +0100
Subject: [PATCH 2/2] ssh: fix kexinit error generation
---
lib/ssh/src/ssh_transport.erl | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl
index 371eb19114..44187cbc72 100644
--- a/lib/ssh/src/ssh_transport.erl
+++ b/lib/ssh/src/ssh_transport.erl
@@ -433,7 +433,12 @@ kexinit_error(Class, Error, Role, Own, CounterPart) ->
_ ->
{"Kexinit failed in ~p: ~p:~p", [Role,Class,Error]}
end,
- io_lib:format(Fmt, Args).
+ try io_lib:format(Fmt, Args) of
+ R -> R
+ catch
+ _:_ ->
+ io_lib:format("Kexinit failed in ~p: ~p:~p", [Role, Class, Error])
+ end.
alg_info(client, Alg) ->
alg_info(Alg);
--
2.35.3