From 6813779128ccfa5040fcf7de09af9e11dbcda8c3 Mon Sep 17 00:00:00 2001 From: Armin Preiml Date: Wed, 21 Dec 2022 12:06:00 +0100 Subject: [PATCH] format::ssh: close base64 encoder at right moment otherwise the padding will be written after the comment. --- format/ssh/key.ha | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format/ssh/key.ha b/format/ssh/key.ha index 06f33a5..2420b30 100644 --- a/format/ssh/key.ha +++ b/format/ssh/key.ha @@ -107,8 +107,8 @@ export fn encode_pubkey(sink: io::handle, key: const *key) (void | io::error) = export fn encode_pubkeystr(sink: io::handle, key: *key) (void | io::error) = { fmt::fprintf(sink, "{} ", keytype(key))?; let enc = base64::newencoder(&base64::std_encoding, sink); - defer io::close(&enc)!; encode_pubkey(&enc, key)?; + io::close(&enc)!; if (key.comment != "") { fmt::fprintf(sink, " {}", key.comment)?; }; -- 2.45.2