agent: For SSH key, don't put NUL-byte at the end.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 21 May 2019 06:50:28 +0000 (15:50 +0900)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 1 Jul 2022 16:06:43 +0000 (17:06 +0100)
commitb86db6eaada2d24d64aed7adabf85d95866a21e8
tree48435baf42f74f62a25ed00fd28745fcac0b1bb4
parent078118e031b41db84a7eeae7a903e1b44511255c
agent: For SSH key, don't put NUL-byte at the end.

* agent/command-ssh.c (ssh_key_to_protected_buffer): Update
the length by the second call of gcry_sexp_sprint.

--

GnuPG-bug-id: 4502
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(cherry picked from commit 6e39541f4f488fe59eac399bad18c465f373a784)

Gbp-Pq: Topic from-2.2.16
Gbp-Pq: Name agent-For-SSH-key-don-t-put-NUL-byte-at-the-end.patch
agent/command-ssh.c